Ubuntu focal: nekonzistentní verze libc6 a libc6-dev

Ubuntu focal: nekonzistentní verze libc6 a libc6-dev
« kdy: 28. 04. 2021, 17:34:04 »
Řeším takovou nepěknou věc s Ubuntu 20.0 LTS v LXD kontejneru. Po update keše balíčků odmítá nainstalovat libpcap-dev:

Kód: [Vybrat]
$ lxc launch images:ubuntu/focal test
Creating test
Starting test
$ lxc exec test bash

root@test:~# cat /etc/apt/sources.list
# Generated by distrobuilder
deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse

root@test:~# apt update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [623 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [555 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [947 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [763 kB]
Fetched 3111 kB in 2s (1788 kB/s)                   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

root@test:~# apt install libpcap-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpcap-dev : Depends: libpcap0.8-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root@test:~# apt install libpcap0.8-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpcap0.8-dev : Depends: libc6-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root@test:~# apt install libc6-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

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.

root@test:~# apt show libc6
Package: libc6
Version: 2.31-0ubuntu9.3
Status: install ok installed


root@test:~# apt show libc6-dev
Package: libc6-dev
Version: 2.31-0ubuntu9.2

Podle informací na webu má být k dispozici balíček libc6-dev ve verzi 2.31-0ubuntu9.3, tím by se můj problém nejspíš vyřešil. Jenže apt ho nevidí. Co s tím?


Re:Ubuntu focal: nekonzistentní verze libc6 a libc6-dev
« Odpověď #1 kdy: 28. 04. 2021, 17:51:32 »
apt-get -f install libpcap0.8-dev nepomuze?

Re:Ubuntu focal: nekonzistentní verze libc6 a libc6-dev
« Odpověď #2 kdy: 28. 04. 2021, 18:15:11 »
apt-get -f install libpcap0.8-dev nepomuze?
Nepomůže:

Kód: [Vybrat]
root@test:~# apt-get -f install libpcap0.8-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpcap0.8-dev : Depends: libc6-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Zatímco právě jsem refreshnul tuhle stránku: https://packages.ubuntu.com/focal-updates/amd64/libc6-dev/download
a verze poklesla z 9.3 na 9.2.

Zdá se tedy, že došlo k downgradu, se kterým si apt nedokáže sám poradit. Tak doufám, že se problém opraví sám v příštím buildu LXD image, kde bude libc6 ve verzi 9.2 místo verze 9.3.


_Jenda

  • *****
  • 1 622
    • Zobrazit profil
    • https://jenda.hrach.eu/
    • E-mail
Re:Ubuntu focal: nekonzistentní verze libc6 a libc6-dev
« Odpověď #3 kdy: 28. 04. 2021, 18:24:37 »
Můžeš downgradovat ručně hned: apt-get install --allow-downgrades libc6-dev=2.31-0ubuntu9.2

Re:Ubuntu focal: nekonzistentní verze libc6 a libc6-dev
« Odpověď #4 kdy: 28. 04. 2021, 21:47:34 »
Můžeš downgradovat ručně hned: apt-get install --allow-downgrades libc6-dev=2.31-0ubuntu9.2
Je to naopak, je potřeba downgradovat lib6 (bez -dev), která je v systému předinstalovaná ve verzi 9.3, zatímco v repozitáři je 9.2. Potom to začne celé fungovat.

V mém případě ovšem jde o to, že dané kontejnery zakládám a instaluju automaticky pomocí Ansible. A dnešní den jsem strávil hledáním příčiny, proč se to rozbilo a kde mám v playbooku chybu. A zdá se, že jí nemám já, ale oni. A podle všeho se to zítra samo opraví.