I accidently renamed /lib/x86_64-linux-gnu/libc.so.6 to /lib/x86_64-linux-gnu/libc.so.6-bak

Now I can not perform some commands such as

ls ll vim wget. . . . . it is showing the following error whenever I try to execute any command

error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

I can not rename it back


I suppose you'd have to find a statically linked program (like busybox if you have busybox-static installed or something) with which you could move it back, or else boot from a rescue disk, like an ubuntu live CD or someting, and do it from there.

  • but I cant login to server, Also it is an AWS server – Abhijith May 9 '19 at 8:21
  • Thanks guys. I was able to recover the server. I got help. – Abhijith May 9 '19 at 9:12

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.