LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Shared libraries question...need help (https://www.linuxquestions.org/questions/linux-general-1/shared-libraries-question-need-help-49850/)

tarballed 03-14-2003 02:40 PM

Shared libraries question...need help
 
Hello everyone. I have a question on shared libraries.
I was installing some software and everything went fine, until I tried to execute the problem.

Here is what happened when I tried to run the program:

error while loading shared libraries: liblber.so.2: cannot open shared object file: No such file or directory

So I did a whereis to see where liblber.so.2 is which returned this:

liblber.so: /usr/local/lib/liblber.so.2 /usr/local/lib/liblber.so

My question is, what do I need to do to correct this so I can run the program?
Secondly, can someone explain to me what the problem is and how to correct this/learn from this so if I run into this again in the future, I know how to correc t it.

Thanks

Tarballed

Mara 03-14-2003 03:46 PM

It looks you don't have /usr/local/lib in LD_LIBRARY_PATH variable or ld.so.conf file. They work the same way as PATH for executables. When your library is not in one of them, it cannot be easily used (without the whole path).

The easiest solution: add '/usr/local/lib' to ld.so.conf and run 'ldconfig' (to re-read the file).

tarballed 03-14-2003 04:22 PM

Mara,

Thanks for your help. I remember having a similar problem before. I had thought I entered the correct information into the ld.so.conf file, but I actually put the full path. Whoops!

Once I put the full path in and ran ldconfig, it fixed it.

Do you happen to have any links that explain this in more detail? I would like to know more about this file so I can increase my knowledge.

Thanks.

Tarballed

Mara 03-15-2003 01:04 PM

man ldconfig
I don't know any other links. The idea is very simple and I hope the man page has all the info you need.


All times are GMT -5. The time now is 08:37 PM.