I tried to update a system of mine, with which I had no problems whatsoever, and ran into problem while executing a aptitude full-upgrade. The update ran through normally till I got this error :

 Preparing to replace libc6 2.13-21 (using .../libc6_2.13-24_amd64.deb) ...

A copy of the C library was found in an unexpected directory:
  '/lib/ld-2.11.2.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' and try again.

dpkg: error processing /var/cache/apt/archives/libc6_2.13-24_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.13-24_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
dpkg: dependency problems prevent configuration of libc6-dev:
 libc6-dev depends on libc6 (= 2.13-24); however:
  Version of libc6 on system is 2.13-21.
dpkg: error processing libc6-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libc6-i386:
 libc6-i386 depends on libc6 (= 2.13-24); however:
  Version of libc6 on system is 2.13-21.
dpkg: error processing libc6-i386 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libc6-dev
 libc6-i386

Anytime now that I try to upgrade or install any package I get this error. Any attempts to move files only required more files to be moved. I also couldn't fix with dpkg.

Some Info :

Debian Linux 3.1.0-1-amd64
#dpkg -l | grep libc6
ii  libc6                                2.13-21                       
iU  libc6-dev                            2.13-24                        
iU  libc6-i386                           2.13-24    

Thank you !

link|improve this question
Have you skipped a version of debian? – pjc50 Jan 11 at 16:49
2.13-21 -> 2.13-24 looks like you're upgrading within unstable or testing. /lib/ld-2.11.2.so exists in stable; I think it should have been removed at some point in the upgrade chain. You will probably find that 'dpkg -S ld-2.11.2.so' reveals it not to be in any package. Can you confirm that? – Richard Kettlewell Jan 11 at 16:57
@pjc50 No, I just didn't update my system for about 3 weeks – Nazgoul Jan 14 at 16:55
@RichardKettlewell You are right, the output of the command is "dpkg-query: no path found matching pattern ld-2.11.2.so" – Nazgoul Jan 14 at 16:56
feedback

1 Answer

Following the comment response...

Start by checking that when you run a program you get a copy of the dynamic linker that does not involve that path. You should see:

$ ldd /bin/ls | grep ld-linux
    /lib64/ld-linux-x86-64.so.2 (0x00007fc695aef000)

(The hex address may differ.) This file should be a symlink pointing to /lib/x86_64-linux-gnu/ld-2.13.so which should not be a symlink and certainly shouldn’t end up at ld-2.11.2.so.

Assuming this all looks right it should be safe to go ahead and rename /lib/ld-2.11.2.so out of the way (though I would have rescue media to hand nevertheless). Don’t delete it until you’re sure everything’s still OK, in case it turns out that you need to put it back!

You may well find there are complaints about other leftover files, which can be check and dealt with in much the same way.

Obviously this advice is not directly tested!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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