-   Linux - Newbie (
-   -   Shared library error (

an_sush 01-09-2009 05:14 AM

Shared library error
I have a linux box and i connect to it using putty on my windows. But when i login as root i get the follwing error:
/bin/sh: error while loading shared libraries: cannot open shared object file: No such file or directory
and no other command like echo, ls works.

However if i login as a non root user and then do a su, i dont get any such error and all commands work properly.
Kindly help

chakka.lokesh 01-09-2009 05:18 AM

check the following link:

and tell me does this helped you?

repo 01-09-2009 05:20 AM

try to run

an_sush 01-09-2009 05:41 AM


Originally Posted by chakka.lokesh (Post 3402185)
check the following link:

and tell me does this helped you?

no solution in the above post

ldconfig also doesnt work:


sh-3.2# ldconfig
sh: ldconfig: command not found

chakka.lokesh 01-09-2009 05:45 AM


Originally Posted by an_sush (Post 3402204)
no solution in the above post

try installing this.

an_sush 01-09-2009 05:53 AM


Originally Posted by chakka.lokesh (Post 3402207)

wat to install here? a header file and 2 c files?

chakka.lokesh 01-09-2009 07:38 AM

Can you tell me which Linux distribution you are using?

sundialsvcs 01-09-2009 09:26 AM

First of all, the command probably needs to be: /sbin/ldconfig.

Next, you need to locate to see if the file actually exists at all on your system. On my system, it's found in /lib, and if "locate" does not produce an answer do ls /lib/*libdl* and ls /usr/lib/*libdl* just to be make sure. (The "locate" command uses a database that could be out-of-date.)

The loader system in Linux is very flexible, and unlike Windows it does not specify that libraries must be in one certain place nor that only a single version of a library can be installed at one time. (Hence "ldconfig," which builds or rebuilds a search-directory.)

Your immediate concern, though, is not to understand how it works but merely to understand why it is broken. (You can "think about" the fire at your leisure after you have put it out...)

If you find that the library really isn't there, you need to find out which package(s) contain it and to reinstall those packages. (Hopefully the package-installation software does not require this library.) But the first thing to rule-out is that "it's really there, but the ldconfig-index is not up-to-date and therefore does not see it."

This problem could be very tough to fix if the so-called "busybox" core software is affected... commands like ls and so-on. Your hands might be well-tied. And if that is the case, and you can't come up with an immediate :rolleyes: explanation of how it happened, uhh... you might have been hacked or root-kitted. But for right-now, let us hope for the best.

All times are GMT -5. The time now is 09:05 AM.