Skip to content
Advertisement

Linux: Moved `/lib/x86_64-linux-gnu/ld-2.28.so` and now SSH is dead [closed]

The problem is basically already in the title: Because I wasn’t able to upgrade libc6 I did what the output told me to do: Remove (or move) /lib/x86_64-linux-gnu/ld-2.28.so

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

But right after executing that mv command, ssh is doing weird things such as:

~$ mv
-bash: /usr/bin/mv: No such file or directory

As you can see, I am in my home directory ~ but somehow Linux thinks I am in /usr/bin/mv. Any idea how I get back to “normal” via SSH?

Advertisement

Answer

The error happens because the program interpreter (the glibc dynamic loader) can no longer be found. The upgrade error message was due to bug #954915: [libc6] upgrade fail: A copy of the C library was found in an unexpected directory. Its advice is incorrect, and following it breaks the system.

If you do not happen to have a statically linked collection of tools install (busybox, sash, sln), you will have to boot from rescue media and undo the move. You may be able to avoid that if you have an open program (such as an editor) running as root, which can make a copy of the dynamic loader in the expected location.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement