LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-30-2006, 02:36 PM   #1
Moebius
Member
 
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216

Rep: Reputation: 30
setting lib paths


I compiled my application successfully, but now when I try to run it, it says it requires libOgreMain.so.11 to run, which is correct, but the lib is already in /usr/local/lib. How can I make sure the programs looks there? Is there something for libs equivilant to the $PATH env variable for binaries? If I were lazy i could copy the required libs into the run dir, but what is the proper way of going about this problem?
 
Old 07-30-2006, 02:52 PM   #2
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
There should be an entry for /usr/local/lib in /etc/ld.so.conf, check as follows:
Code:
cat /etc/ld.so.conf | grep /usr/local/lib
If this returns a line, it's there. If not, it should be added then run ldconfig.

You also might need to set PKG_CONFIG_PATH, but that's for compiling.
 
Old 07-30-2006, 02:56 PM   #3
Moebius
Member
 
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216

Original Poster
Rep: Reputation: 30
Hmm the only three lines are:

$ cat /etc/ld.so.conf
/lib32
/usr/lib32
/usr/X11R6/lib32

Does ubuntu handle it differently somehow? I can't imagine my system would function at all if /usr/lib and /usr/local/lib were supposed to be in there, but this is the only app that currently has this problem.
 
Old 07-30-2006, 08:48 PM   #4
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by Moebius
Is there something for libs equivilant to the $PATH env variable for binaries?
Yes, it's called LD_LIBRARY_PATH.
 
Old 07-30-2006, 08:50 PM   #5
Moebius
Member
 
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by AdaHacker
Yes, it's called LD_LIBRARY_PATH.
Hmmm what does it mean if that is blank?
 
Old 07-30-2006, 09:04 PM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Follow the instructions posted by ciotog (post 2) and your apps will also search for libs in /usr/local/lib.
 
Old 07-31-2006, 06:15 AM   #7
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by Moebius
Hmmm what does it mean if that is blank?
Absolutely nothing. Typically, the dynamic linker will look in /lib and /usr/lib without having to be told anything. Other common locations for libraries are normally added to /etc/ld.so.conf. LD_LIBRARY_PATH is typically used for ad hoc cases like installing a library in your home directory. It's not supposed to have a default value.
 
  


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
Setting up paths Pyro-dragon Linux - Newbie 5 03-07-2005 06:04 PM
Getting extra lib / include paths with automake MadCactus Linux - Software 0 08-21-2004 01:04 PM
Setting Paths? bluelaguna Linux - Software 2 08-07-2004 02:31 PM
Setting Paths ken22 Linux - Software 1 06-19-2003 01:45 PM
include and lib paths Mux Slackware 1 05-05-2002 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:07 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
Open Source Consulting | Domain Registration