libxml2-dev : Depends: libicu-dev but it is not going to be installed

Asked by Sascha Papini

Hi community, I have a problem when I try to install libxml2-dev.

If I run apt install libxml2-dev, I receive
The following packages have unmet dependencies:
 libxml2-dev : Depends: libicu-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages

It I try to install libicu-dev, I receive
The following packages have unmet dependencies:
 libicu-dev : Depends: libc6-dev but it is not going to be installed or
                       libc-dev

It I try to install libc6-dev I receive
The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is to be installed
E: Unable to correct problems, you have held broken packages.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu libxml2 Edit question
Assignee:
No assignee Edit question
Solved by:
Sascha Papini
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

apt-cache policy libxml2-dev libicu-dev libc6-dev libc6; lsb_release -a; uname -a

Thanks

Revision history for this message
Sascha Papini (saschap) said :
#2
Revision history for this message
Sascha Papini (saschap) said :
#3

root@zabbix:~# apt-cache policy libxml2-dev libicu-dev libc6-dev libc6; lsb_release -a; uname -a
libxml2-dev:
  Installed: (none)
  Candidate: 2.9.10+dfsg-5ubuntu0.20.04.1
  Version table:
     2.9.10+dfsg-5ubuntu0.20.04.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
     2.9.10+dfsg-5 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libicu-dev:
  Installed: (none)
  Candidate: 66.1-2ubuntu2.1
  Version table:
     66.1-2ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
     66.1-2ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6-dev:
  Installed: (none)
  Candidate: 2.31-0ubuntu9.2
  Version table:
     2.31-0ubuntu9.2 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6:
  Installed: 2.31-0ubuntu9.3
  Candidate: 2.31-0ubuntu9.3
  Version table:
 *** 2.31-0ubuntu9.3 100
        100 /var/lib/dpkg/status
     2.31-0ubuntu9.2 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Linux zabbix 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Try

sudo apt install libxml2-dev libc6=2.31-0ubuntu9.2

and report the results

Revision history for this message
Sascha Papini (saschap) said :
#5

root@zabbix:~# sudo apt install libxml2-dev libc6=2.31-0ubuntu9.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  icu-devtools libc-dev-bin libc6-dev libcrypt-dev libicu-dev linux-libc-dev manpages-dev
Suggested packages:
  glibc-doc icu-doc pkg-config
The following NEW packages will be installed:
  icu-devtools libc-dev-bin libc6-dev libcrypt-dev libicu-dev libxml2-dev linux-libc-dev manpages-dev
The following packages will be DOWNGRADED:
  libc6
0 upgraded, 8 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 19.2 MB of archives.
After this operation, 79.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6 amd64 2.31-0ubuntu9.2 [2,715 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 icu-devtools amd64 66.1-2ubuntu2.1 [189 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc-dev-bin amd64 2.31-0ubuntu9.2 [71.8 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-libc-dev amd64 5.4.0-94.106 [1,114 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 libcrypt-dev amd64 1:4.4.10-10ubuntu4 [104 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6-dev amd64 2.31-0ubuntu9.2 [2,520 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libicu-dev amd64 66.1-2ubuntu2.1 [9,451 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxml2-dev amd64 2.9.10+dfsg-5ubuntu0.20.04.1 [735 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 manpages-dev all 5.05-1 [2,266 kB]
Fetched 19.2 MB in 1s (28.3 MB/s)
Preconfiguring packages ...
dpkg: warning: downgrading libc6:amd64 from 2.31-0ubuntu9.3 to 2.31-0ubuntu9.2
(Reading database ... 166380 files and directories currently installed.)
Preparing to unpack .../libc6_2.31-0ubuntu9.2_amd64.deb ...
Unpacking libc6:amd64 (2.31-0ubuntu9.2) over (2.31-0ubuntu9.3) ...
Setting up libc6:amd64 (2.31-0ubuntu9.2) ...
Selecting previously unselected package icu-devtools.
(Reading database ... 166380 files and directories currently installed.)
Preparing to unpack .../0-icu-devtools_66.1-2ubuntu2.1_amd64.deb ...
Unpacking icu-devtools (66.1-2ubuntu2.1) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../1-libc-dev-bin_2.31-0ubuntu9.2_amd64.deb ...
Unpacking libc-dev-bin (2.31-0ubuntu9.2) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../2-linux-libc-dev_5.4.0-94.106_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.4.0-94.106) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../3-libcrypt-dev_1%3a4.4.10-10ubuntu4_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../4-libc6-dev_2.31-0ubuntu9.2_amd64.deb ...
Unpacking libc6-dev:amd64 (2.31-0ubuntu9.2) ...
Selecting previously unselected package libicu-dev:amd64.
Preparing to unpack .../5-libicu-dev_66.1-2ubuntu2.1_amd64.deb ...
Unpacking libicu-dev:amd64 (66.1-2ubuntu2.1) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../6-libxml2-dev_2.9.10+dfsg-5ubuntu0.20.04.1_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.10+dfsg-5ubuntu0.20.04.1) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../7-manpages-dev_5.05-1_all.deb ...
Unpacking manpages-dev (5.05-1) ...
Setting up manpages-dev (5.05-1) ...
Setting up linux-libc-dev:amd64 (5.4.0-94.106) ...
Setting up icu-devtools (66.1-2ubuntu2.1) ...
Setting up libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Setting up libc-dev-bin (2.31-0ubuntu9.2) ...
Setting up libc6-dev:amd64 (2.31-0ubuntu9.2) ...
Setting up libicu-dev:amd64 (66.1-2ubuntu2.1) ...
Setting up libxml2-dev:amd64 (2.9.10+dfsg-5ubuntu0.20.04.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.3) ...

root@zabbix:~# apt-cache policy libxml2-dev libicu-dev libc6-dev libc6; lsb_release -a; uname -a
libxml2-dev:
  Installed: 2.9.10+dfsg-5ubuntu0.20.04.1
  Candidate: 2.9.10+dfsg-5ubuntu0.20.04.1
  Version table:
 *** 2.9.10+dfsg-5ubuntu0.20.04.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.9.10+dfsg-5 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libicu-dev:
  Installed: 66.1-2ubuntu2.1
  Candidate: 66.1-2ubuntu2.1
  Version table:
 *** 66.1-2ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     66.1-2ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6-dev:
  Installed: 2.31-0ubuntu9.2
  Candidate: 2.31-0ubuntu9.2
  Version table:
 *** 2.31-0ubuntu9.2 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6:
  Installed: 2.31-0ubuntu9.2
  Candidate: 2.31-0ubuntu9.2
  Version table:
 *** 2.31-0ubuntu9.2 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Linux zabbix 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux