In a misguided attempt to recompile ld
with debug symbols, I ended up with a /lib64 that was not symlinked to /lib (Debian 64-bit libs are in in /lib/x84_64-linux-gnu). I attempted to reinstall libc6 using apt
, which errored out complaining about the above.
I (mistakenly) figured I could just mv /lib64 /tmp && ln -s /lib /lib64
; the first command worked, leaving a broken system (/bin/ld not found
etc.).
Is there any way to fix this in-place? (i.e. without running a rescue disk)
If I could have posted this anonymously, I would have ... [sigh]
Not sure if this would have helped with part of it, but if you ever find you've moved the runtime linker so that things like mv,cp,ln,rm no longer work, you can still run them (and hopefully rescue yourself) by specifying the runtime linker explicitly. E.g.
If anyone else ever has this problem; once I had used a recovery disc to put the files back where they belonged, the following script allowed me to reinstall libc: