Hi I am struggling with this for the past one month.
sudo apt-get upgrade
and sudo apt-get autoremove
is erroring out with following error
E: Unmet dependencies. Try using -f.
When I am running sudo apt-get install -f
, it is erroring out as follows.
Fetched 30.2 MB in 32s (928 kB/s)
Preconfiguring packages ...
Setting up libc-bin (2.23-0ubuntu9) ...
Segmentation fault
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/local/lib' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
Segmentation fault
dpkg: error processing package libc-bin (--configure):
subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
1) The question is posted here link . But the answer mentioned is specific to the user.
2) As mentioned here link, I tried sudo apt-get --reinstall install libc-bin
. But this is showing
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
3) sudo dpkg --configure -a
errors out as follows
Errors were encountered while processing:
libosmesa6:i386
libgl1-mesa-dri:i386
libglapi-mesa:i386
libgl1-mesa-glx:amd64
libgl1-mesa-glx:i386
libegl1-mesa:amd64
xserver-xephyr
xserver-xorg-core
libgl1-mesa-dev:i386
libwayland-egl1-mesa:amd64
Any help will be highly appreciated as this is a machine where all my academic projects are configured, so cannot afford a reinstall.
EDIT:
4) sudo dpkg --configure -D 777 libc-bin
gives the following output:
D000001: ensure_diversions: new, (re)loading
D000001: process queue pkg libc-bin:amd64 queue.len 0 progress 1, try 1
D000040: checking dependencies of libc-bin:amd64 (- <none>)
D000400: checking group ...
D000400: checking possibility -> libc6
D000400: checking non-provided pkg libc6:amd64
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> libc6
D000400: checking non-provided pkg libc6:amd64
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000040: ok 2 msgs >><<
D000040: checking Breaks
D000400: checking breaker locales:all virtbroken <none>
Setting up libc-bin (2.23-0ubuntu9) ...
D000002: fork/exec /var/lib/dpkg/info/libc-bin.postinst ( configure 2.23-0ubuntu9 )
Segmentation fault
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/local/lib' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
Segmentation fault
dpkg: error processing package libc-bin (--configure):
subprocess installed post-installation script returned error exit status 139
D000001: ensure_diversions: same, skipping
Errors were encountered while processing:
libc-bin
EDIT:
5) I was trying the solution mentioned here link. But sudo mv /usr/lib/x86_64-linux-gnu/libtic.so.5.9 /root
gives the error
mv: cannot stat '/usr/lib/x86_64-linux-gnu/libtic.so.5.9': No such file or directory
Does that mean that in my case some other library is causing the issue?
EDIT : I was able to do an strace during sudo apt-get install -f
and the log is available here ; if that helps anyone.
6) I tried to increase the APT cache limit as mentioned here. But it did not help.
EDIT : Update Answer to Elder Geek's suggestions
7) I have tested my ram with memtest and it doesn't show any error. I have also conducted a SMART self test on my hard drive (short), which is showing that the "Disk is ok".
8) I have manually checked and this particular library /usr/lib/x86_64-linux-gnu/libtic.so.5.9
does not exist in the location. (So I believe that such a library is not existing in my system and some other library is causing the issue.)
9) I do not have the path /usr/lib/i686-linux-gnu
in my system.
10) There was a Typo, I was checking /etc/apt/sources.lst
as mentioned in the original answer. I do have a sources.list
.
These are the entries I can see there. I dont see any ppa mentioned there.
deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
deb http://archive.ubuntu.com/ubuntu xenial main universe restricted
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe
Also I am unable to install any ppa manager since apt itself is broken and I am not able to install anything.
11) Additional info : This was originally a 14.04 system which was upgraded to 16.04. Those ppas I had in 14.04 were disabled during the upgrade. However, this upgrade happened almost a year ago and the system was running smoothly for almost an year now.
12) Last and most important: I remember performing a sudo apt-get dist-upgrade
some time before all the problems started to appear. Can this be something which caused the issue?
sudo dpkg --configure -D 777 libc-bin
in a code block ({}
button). – dessert Nov 11 '17 at 08:24/etc/apt/apt.conf.d/70debconf
as explained e.g. here. – dessert Nov 11 '17 at 12:15/var/lib/dpkg/info/libc-bin.postinst
and maybe even for the rest of them in that directory beginning with libc-bin. – Videonauth Nov 26 '17 at 22:03