Score:0

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

no flag

I was debugging an error on my system (debian linux) and part of that I renamed the libc.so.6 file to something else.

$ sudo mv libc.so.6 libc-2.28.so.6

Now none of my bash commands will work.

$ ls
ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
$ sudo mv libc-2.28.so.6 libc.so.6
sudo: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

How can I fix this please?

The file exists but I can't rename it back:

$ ./libc-2.28.so.6
GNU C Library (Debian GLIBC 2.28-10+deb10u2) stable release version 2.28.
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.3.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
guiverc avatar
cn flag
Please refer https://askubuntu.com/help/on-topic, Ubuntu and *official* flavors of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes. *Your packages are all EOL in Ubuntu systems*
hr flag
If your system includes the statically-linked `busybox`, you may be able to use that - see for example [After accidentally renaming /usr, how do I rename it back?](https://unix.stackexchange.com/a/432003/65304)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.