Problem

So I having this problem after upgrading from Ubuntu server 8.04->10.04->12.04.

Initial Command

apt-get install -f

dpkg: warning: files list file for package `tcpd' missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `python-pkg-resources' missing, assuming package has no files currently installed.
.... Many many more of these warnings
dpkg: warning: files list file for package `libxml-libxml-perl' missing, assuming no files currently installed.

(Reading database ... 1126 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10 (using .../libc6_2.15-0ubuntu10.5_i386.deb) ...

A copy of the C library was found in an unexpected directory:
  '/lib/i386-linux-gnu/libc-2.15.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/lib/i386-linux-gnu' and try again.

dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Things I have tried

  • I have tried moving the libc-2.15.so but this creates an error: apt-get: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
  • apt-get --purge remove libc6 this will not work as libc6 is needed by the system
  • sudo apt-get install --reinstall libc6=2.15-0ubuntu10.5 libc6-dev=2.15-0ubuntu10.5 just guess work but this didn't work either.

Anyway, as you can see I'm stuck, I can not upgrade any of my packages...

My sources list is take from here https://help.ubuntu.com/12.04/sample/sources.list

share|improve this question
up vote 3 down vote accepted

Run :

sudo dpkg -r libc6

sudo rm /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb

If above are successful or not, run :

gksudo gedit /var/lib/dpkg/status

In the resulting gedit, remove the whole section starts with :

Package : libc6

then run an update. If this not resolves, You need to format.

share|improve this answer
    
Mother of all that is not holly, this worked Mr Bill. I thank you sir... – Jamie Hutber Jun 27 '14 at 0:44

You can do it as follow! It will turn your setup into Debian Experimental which contains packages in the alpha stage of development. It may also damage your system it in the process. To quote the Debian FAQ:

This directory contains packages and tools which are still being developed, and are still in the alpha testing stage. Users shouldn't be using packages from here, because they can be dangerous and harmful even for the most experienced people.

add this to sources.list:

deb http://ftp.debian.org/debian experimental main

Next, run:

apt-get update && apt-get install libc6

Then, remove or comment out this line from the sources.list file:

deb http://ftp.debian.org/debian experimental main

Lastly, update your package caches again.

apt-get update

And after this you will able to use libc6 >= 2.17

share|improve this answer
    
-1 If this works, it will essentially “upgrade” to Debian Unstable, which is probably not what OP wants to do. – David Foerster Nov 8 '14 at 13:55
    
i say IT CAN DAMAGE YOUR SYS. – Slavik Timoschenko Nov 11 '14 at 2:06
    
I wasn't commenting the risk of your proposal. I was explaining what it does and why it probably goes against OP's interests, which is strongly implied by him asking on a Ubuntu-centric platform. – David Foerster Nov 11 '14 at 12:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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