Unmet dependencies. Libc6 The package system is broken
Solution 1
I had similar issue on freshly installed Ubuntu 20.04.2 desktop 64bit, the difference is that libc6 ...9.3 was installed but my packages (g++ build-essential etc) could not be installed beceause libc6-dev could not be installed because it required libc6 ...9.2 which was older then the one installed
libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is to be installed
So I just downgraded libc6 (and libc-bin too, because it seems very related to me) to version 2.31-0ubuntu9.2 this way:
sudo apt install libc6=2.31-0ubuntu9.2 libc-bin=2.31-0ubuntu9.2
Now my packages could install :) so it seems to work, let's see if we don't have much problems - but I guess not because this is a tiny change in libc (on the other side libc is very important)
BUT I DON'T KNOW WHAT WILL HAPPEN IN THE FUTURE:
- Will it in future updates hold this package fixed to still old version?
- Does anyone know how to unfix this version?
- Even if I could somehow unfix it from this version, then will ubuntu have this issue in the future?
- Does anyone know if it is some bug in Ubuntu packaging repository? I repeat: this was on a totally fresh Ubuntu 20.04 desktop
Some other places to look for inspiration:
Solution 2
I would like to add to the answer of Tomeg, that downgrading with aptitude helped me to keep my packages depending on libc6 installed. When downgrading with:
sudo apt install libc6=2.31-0ubuntu9.
apt would also uninstall all my packages depending on libc6.
The following packages will be DOWNGRADED:
libc6
0 upgraded, 0 newly installed, 1 downgraded, 206 to remove and 0 not upgraded.
As I described here this did help since aptitude offered me different options:
sudo aptitude install libc6=2.31-0ubuntu9.2
I had to decline the first two options (2x n) and then the third was to solely downgrade (y) without uninstalling other packages.
Related videos on Youtube
Danatela
Updated on September 18, 2022Comments
-
Danatela over 1 year
Whenever I try to upgrade or install a new package i get the following
ibc6-dbg: Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.1 is installed \ libc6-dev: Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.1 is installed \ Depends: libc-dev-bin (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.2 is installed libc6-i386: Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.1 is installed
I've triedapt --fix-broken install
I've triedsudo apt-get -f install
to force install.
I get the same error messages in both cases.I'm still new to Linux and would love to learn how to fix these issues without wiping the os and reinstalling
-
Admin over 3 yearsPlease edit your question to show the complete output of
sudo apt update
and then ofsudo apt upgrade
-
Admin over 3 yearsAs user535733 has said; you likely had warnings in your
sudo apt update
output, OR it provides clues as to a problem. A quick scan of the packages expected and I see 9.2 matching your =9.2 forlibc6-dbg
, so it could be the source isn't showing or error insudo apt update
, or your used mirror isn't up-to-date and needs checking (you start withsudo apt update
detail as you update your software lists on your hardware) etc...
-
-
Alex Savenko almost 3 yearsMan, you nailed it. Thanks!
-
Vincent Gerris almost 3 yearscan you please file a bug on launchpad? I had a similar issue. got too much invested in setup now to potentially break - it seems like a wrong dependency declaration in packages - UPDATE : bugs.launchpad.net/ubuntu/+source/glibc/+bug/1926918 seems this is tracked.
-
peterretief over 2 yearsI am really not happy doing this but it works for now.
-
moralejaSinCuentoNiProverbio over 2 yearsThank you. With this command I could downgrade lib6 and install build essential.
-
Humpity over 2 yearsThankyou. The number of apps to be uninstalled nearly gave me a heartattack. Why can't these repositories keep in sync ?