LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-09-2009, 06:14 AM   #1
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Rep: Reputation: 15
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: libdl.so.2: 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
 
Old 01-09-2009, 06:18 AM   #2
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: Ubuntu
Posts: 211

Rep: Reputation: 32
check the following link:

http://linux.derkeiler.com/Mailing-L.../msg01399.html

and tell me does this helped you?
 
Old 01-09-2009, 06:20 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
try to run
ldconfig
 
Old 01-09-2009, 06:41 AM   #4
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chakka.lokesh View Post
check the following link:

http://linux.derkeiler.com/Mailing-L.../msg01399.html

and tell me does this helped you?
no solution in the above post


ldconfig also doesnt work:

Quote:
sh-3.2# ldconfig
sh: ldconfig: command not found
 
Old 01-09-2009, 06:45 AM   #5
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: Ubuntu
Posts: 211

Rep: Reputation: 32
Quote:
Originally Posted by an_sush View Post
no solution in the above post
try installing this.

http://cvs.sourceforge.jp/cgi-bin/vi...bc/ldso/libdl/
 
Old 01-09-2009, 06:53 AM   #6
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chakka.lokesh View Post
wat to install here? a header file and 2 c files?
 
Old 01-09-2009, 08:38 AM   #7
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: Ubuntu
Posts: 211

Rep: Reputation: 32
Can you tell me which Linux distribution you are using?
 
Old 01-09-2009, 10:26 AM   #8
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,452

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

Next, you need to locate libdl.so 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 explanation of how it happened, uhh... you might have been hacked or root-kitted. But for right-now, let us hope for the best.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while loading shared library : libpng12.so.0 dhanilshah Linux - Software 5 08-18-2011 08:38 AM
error while loading shared library lucky6969b Programming 2 02-08-2006 01:41 AM
error while loading shared library bonniehandi Linux - Newbie 2 11-19-2005 12:43 AM
Shared library error olscratch Slackware 3 11-05-2004 04:46 PM
gnome shared library error mismacku Linux - Software 1 05-03-2003 05:27 PM


All times are GMT -5. The time now is 08:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration