Tuesday, November 19, 2019

apt - Can't install libc6 due to multiarch problems on Ubuntu precise

Since I dpkg-query -L libc6 does not work on my machine due I am not able to install any packages.


# apt-cache policy libc6
libc6:
Installed: 2.15-0ubuntu10.15
Candidate: 2.15-0ubuntu10.17
Version table:
2.15-0ubuntu10.17 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 2.15-0ubuntu10.15 0
100 /var/lib/dpkg/status
2.15-0ubuntu10 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
# apt-cache policy libc6
libc6:
Installed: 2.15-0ubuntu10.15
Candidate: 2.15-0ubuntu10.17
Version table:
2.15-0ubuntu10.17 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 2.15-0ubuntu10.15 0
100 /var/lib/dpkg/status
2.15-0ubuntu10 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc6 libc6-dbg libc6-dev libc6-dev-i386 libc6-i386
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc6 libc6-dbg libc6-dev libc6-dev-i386 libc6-i386
5 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
4 not fully installed or removed.
Need to get 0 B/16.0 MB of archives.
After this operation, 13.3 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 792434 files and directories currently installed.)
Preparing to replace libc6:amd64 2.15-0ubuntu10.15 (using .../libc6_2.15-0ubuntu10.17_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10.17_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.15-0ubuntu10.17_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now to dig deeper into the problem I extracted the preinst script from /var/cache/apt/archives/libc6_2.15-0ubuntu10.17_amd64.deb and run it with ./preinst upgrade 2.15-0ubuntu10.15 which revealed that there is a problem with


# dpkg-query -L libc6
dpkg-query: error: --listfiles needs a valid package name but 'libc6' is not: ambiguous package name 'libc6' with more than one installed instance
Use --help for help about querying packages.

showing the installed packages give:


# dpkg -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii libc6:amd64 2.15-0ubuntu10.15 amd64 Embedded GNU C Library: Shared libraries
rc libc6:i386 2.15-0ubuntu10.15 i386 Embedded GNU C Library: Shared libraries

Trying to get rid of all i386 packages with:


aptitude purge `dpkg --get-selections | grep ":i386" | awk '{print $1}'`

Unfortunately the problem persists with dpkg -l libc6 still showing i386 architecture.


Now I am stuck. Any ideas?

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...