0

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.

2 Answers2

2

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
ewwhite
  • 197,159
  • 92
  • 443
  • 809
1

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

MikeyB
  • 39,291
  • 10
  • 105
  • 189