/lib/libc.so.6 accidently removed
I accidently removed /lib/libc.so.6 running Red Hat 5 Enterprise edition.
I think this /lib/libc.so.6 was a symbolic link to /usr/lib/libc.so
I am unable to execute any of the commands
[root@netappsim lib]# ls -ltr libc.so.6
ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
Please help me as how to revert the sym link /lib/libc.so.6
Welcome to LQ.
1) cd /lib/
3) ln -s libc-2.5.so libc.so.6
Else you will have to shut down the computer.
And use a live Linux cd to get to a command line,
and ' cd ' into /lib/ , to do the ' ln ' command.
If the above doesn't work, before restrting the box, try:
Thanks for all the replies.
The ln command was also displaying the same error messages since ln seems to be using/linked to libc.so.6
I had installed Redhat Linux as a Guest OS using Vmware running Windows as host.
Fortunately I had the recent backup of the entire the virtual machine and so was able to revert to the earlier state.
Unfortunately, i didnt try executing /lib/ld-linux.so.2 --library-path /lib /bin/ln -s /lib/libc-2.5.so /lib/libc.so.6
as I had already restarted the system.
I was surprised I couldn't find an answer to the "removed libc symlink" problem other than "use a live CD" (which I couldn't do, as I did this on a server on the other side of the planet). I resolved the issue by using a statically linked version of "ln" that was already in the server's /sbin.
E.g., this restored it for my configuration:
/sbin/sln /lib64/libc-2.5.so /lib64/libc.so.6
The statically linked ln doesn't need the dynamic libc.
|All times are GMT -5. The time now is 09:20 AM.|