Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a CentOS server, VPS. After running this command I can't work with server and get the same error in all actions (SSH, Login, ls and ...)

The command:

ln -s /lib/libc.so.1  /lib/libc.so.6 -f

And the error is:

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

I have VNC to server but because I can't login to server, that's unusable.

Thanks in advance.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Looks like you overwrote one of the links for your C library. Why did you do this? There's no reason you should be modifying links or library files.

Where did /lib/libc.so.1 come from? Cecking my CentOS 4, 5 and 6 systems, that file is not included in the distribution.

What version of CentOS is this? On CentOS 5, libc.so.6 should link to libc-2.5.so.

[root@xt ~]# ls -l /lib/libc*
-rwxr-xr-x 1 root root 1689728 Apr 20 07:32 /lib/libc-2.5.so
lrwxrwxrwx 1 root root      11 Apr 29 22:27 /lib/libc.so.6 -> libc-2.5.so
share|improve this answer

You may be able to recover from your error by running ldconfig.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.