LinuxQuestions.org
Help answer threads with 0 replies.
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 03-06-2006, 11:45 AM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,149
Blog Entries: 4

Rep: Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105
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 ...
Code:
failed to initialize (something): cannot open shared object file: 
no such file or directory
!!
Try this (as root):
Code:
 # /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
Dragineez
Member
 
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!
 
  


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 libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
"libXm.so.3: cannot open shared object" cbranje Programming 5 02-01-2005 07:27 AM
Not loading gdm;"libX11.so.6 cannot open shared object" zlobby Linux - Newbie 6 03-03-2004 04:30 PM
/usr/libexec/ld-elf.so.1: Shared object "libgd.so.4" 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:49 PM.

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
Open Source Consulting | Domain Registration