Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-06-2006, 11:45 AM   #1
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,159
Blog Entries: 4

Rep: Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233
Tip: handling "cannot open shared object file..."

Let's say that you've just installed (or removed) some program on your system, and suddenly you get ...
failed to initialize (something): cannot open shared object file: 
no such file or directory
Try this (as root):
 # /sbin/ldconfig
There will be a pause, and you're back to the command-prompt without any messages. Try the previous operation again and see if the problem disappeared.

--- Explanation:

Linux supports the concept of "shared libraries" (think "DLL" in Windows), just as Windows does. But Linux's implementation is actually more advanced because it allows you to have more than one version of a shared-library installed at the same time. When a program wants to use a shared-library (as most of them do), the program can be very generic or very specific about what it wants, and Linux will try to comply. Since it would take much too long to search the file-directories for every library request, Linux relies upon a "cache," or reference database, that tells it what libraries are installed, in what version(s), and where. And in this example, that cache is out-of-date, because the library-file is no longer where the cache said it was. The ldconfig program builds or rebuilds that cache.

Many software-installers will execute this command automatically, but some will not. They cannot if you are not installing the software as root, and most (but not all) of them will tell you so. But you can always issue the command yourself.
Old 03-06-2006, 12:57 PM   #2
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
Nice Tip

I love it when a question is both asked and answered in the same post. This is something that I'm sure I will desperately need 6 months from now. I'll remember that I once read something about it, but I won't remember what or where!


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 libraries: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
" cannot open shared object" cbranje Programming 5 02-01-2005 07:27 AM
Not loading gdm;" cannot open shared object" zlobby Linux - Newbie 6 03-03-2004 04:30 PM
/usr/libexec/ Shared object "" not found lxxy *BSD 1 12-04-2003 12:01 PM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:02 PM.

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