Reputation: 273
I'm getting below error in centOS. This started happens when in /lib64/ I renamed libc.so.6 as libc.so.6.backup. Now I'm unable to do anything on VM. None of cp, ls and no other commands are working. Please help me to get this fixed.
cp: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
Upvotes: 0
Views: 2331
Reputation: 33704
You really should not try to replace glibc on a system, expect by upgrading it to a version supplied by the distribution, using the distribution package manager.
That being said, on CentOS systems, /usr/sbin/sln
is statically linked and can be used to add a symbolic link, with something like this:
/usr/sbin/sln /lib64/libc.so.6 /lib64/libc.so.6.backup
Upvotes: 1