0

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?

  • 12.04 is almost EoL, unsupported. With one month or so of support left there's really no point in troubleshooting. A much use of your time is testing a supported release and prepare the upgrade while you still can (you can do a fresh install anytime though). – user589808 Mar 22 '17 at 19:59
  • Thanks for the EoL notice. However, it seems to me that the problem is related to very recent changes to the packaging of libc6 and thus 12.04 development still seems active to me. Maybe I need to report this error to launchpad? – native-human Mar 23 '17 at 8:27
  • The EoL notice is everywhere: meta.askubuntu.com/questions/16823/… . 12.04 support is still active. Development for the most part stopped even before April 2012 (that's how every "non-rolling" distro works). And again, no point in troubleshooting. – user589808 Mar 23 '17 at 8:54
  • If development has stopped why is there an update at launchpad.net/ubuntu/precise/amd64/libc6 two days ago? – native-human Mar 23 '17 at 9:58
0

Got this fixed somehow with the following steps:

aptitude download libc6

mkdir tmp
dpkg-deb -R libc6_2.15-0ubuntu10.17_amd64.deb tmp
# edit DEBIAN/preinst replaced 'dpkg-query -L libc6' with 'dpkg-query -L libc6:amd64'
dpkg-deb -b tmp libc6_2.15-0ubuntu10.17fixed_amd64.deb

dpkg -i libc6_2.15-0ubuntu10.17fixed_amd64.deb

Now I was able to resolve the conflicts. To get rid of all i386 packages I used now:

dpkg -l | grep :i386 | awk '{ print $2 }' | xargs dpkg -P

and now it seems I have got rid of the i386 packages:

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.17               amd64                           Embedded GNU C Library: Shared libraries

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.