5

I have install "libc6_2.17-0ubuntu5.1_amd64.deb" on my ubuntu server 12.04. The orginal libc6 on system is 2.15. After install the package, I check it by:

ldd --version

it shows:

ldd (Ubuntu EGLIBC 2.15-0ubuntu10.5) 2.15

not change. Then I found I can not install anything which depends on libc6 by apt-get, it will reports:

The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is to be installed
 libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.5) but 2.17-0ubuntu5.1 is to be installed
 libnih1 : PreDepends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is to be installed

So I try to uninstall the debian package, first I check:

dpkg -l | grep libc6
ii  libc6            2.17-0ubuntu5.1       Embedded GNU C Library: Shared libraries
ii  libc6-dev        2.15-0ubuntu10.5      Embedded GNU C Library: Development Libraries and Header Files

Then

dpkg -r libc6

It prints a alot of packages which depends on libc6 and tell me:

dpkg: error processing libc6 (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 libc6

It seems it doesn't know there are 2 version libc6 on system.

Use

dpkg --get-selections

gets:

libc6                                           deinstall
libc6-dev                                       install

How should I do?

  • Download a copy of the original 2.15 libc6 from the Ubuntu website, and reinstall it. The stop, do not try to manually force an upgrade of this. You will/have badly trash your system. – Zoredache Apr 11 '14 at 8:01
  • What's the reason of trash my system? Install package not supposed to be install on my system? How would I know that? It gives no warning when install. I install that because I build a program on ubuntu desktop and run it on ubuntu server, the glibc version is not match, so I find glibc on desktop and install it on server – jean Apr 11 '14 at 9:31
2

I have reinstall it by aptitude. It much powerful than apt-get and dpkg, none of them reinstall works.

sudo aptitude reinstall libc6

The following packages will be REINSTALLED:
  libc6 
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.5) but 2.17-0ubuntu5.1 is installed.
 libc-dev-bin : Depends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is installed.
 libnih1 : PreDepends: libc6 (< 2.16) but 2.17-0ubuntu5.1 is installed.
E: I wasn't able to locate a file for the libc6 package. This might mean you need to manually fix this package.
The following actions will resolve these dependencies:

     Downgrade the following packages:                                                                     
1)     libc-bin [2.15-0ubuntu10.5 (now, precise-security, precise-updates) -> 2.15-0ubuntu10 (precise)]    
2)     libc-dev-bin [2.15-0ubuntu10.5 (now, precise-security, precise-updates) -> 2.15-0ubuntu10 (precise)]
3)     libc6 [2.17-0ubuntu5.1 (now) -> 2.15-0ubuntu10 (precise)]                                           
4)     libc6-dev [2.15-0ubuntu10.5 (now, precise-security, precise-updates) -> 2.15-0ubuntu10 (precise)]

Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
  libc-bin libc-dev-bin libc6 libc6-dev 
0 packages upgraded, 0 newly installed, 4 downgraded, 0 to remove and 0 not upgraded.
Need to get 8,852 kB of archives. After unpacking 88.1 kB will be freed.
Do you want to continue? [Y/n/?] y

As aptitude says, there are 4 packages belong to libc6, but I only install one of them by deb file. Maybe that is the reason trash the system

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.