LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-30-2003, 10:08 AM   #1
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
Unhappy is there a way not to type LD_LIBRARY_PATH referring to the *.so everytime you log on


Hi everyone,

I have tried the libusb, a library allowing you to get access to the USB under linux. It is used as an ordinary library. (shared)

While everytime I restart the computer, I have to type the following again:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
where /usr/local/lib is the place where the library files reside.

Could anybody tell me in which way I can *tell* linux to *remember* automatically the path of the library files? Thank you for any answer.

Qu Chen
 
Old 06-30-2003, 10:38 AM   #2
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
There should be a file (somewhere) called :

ld.so.conf

(mine is /etc/ld.so.conf {slackware} )
in that file is the paths that are checked for shared libs...
if you do a `locate ld.so.conf` and add to that file the line ,

/usr/local/lib

save and exit then run `ldconfig` you should be good to go...
 
Old 06-30-2003, 10:52 AM   #3
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
Many thanks jhorvath. Indeed I once tried to add /usr/local/lib and saved ld.so.conf but did not run "ldconfig". Do I need to specify the path of this command?

Thanks again.
 
Old 06-30-2003, 03:26 PM   #4
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
no sir,

you can run it from anywhere (as root of course)...all it does is check /etc/ld.so.conf , /lib , and /usr/lib ...and then updates the links and paths of shared libraries.

have fun with your new found knowledge...also try "man ldconfig" it's all in there
 
Old 07-01-2003, 01:47 AM   #5
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Original Poster
Rep: Reputation: 31
haha Grazie!!
 
  


Reply



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
Question about referring a word in a command output aaronshi *BSD 2 05-14-2005 10:47 PM
Everytime I log on to FC3, I have to reset SMB and Network service to get online timswim78 Linux - Networking 4 03-06-2005 04:51 PM
bash scripting - referring to external arguments into loops linsson Linux - General 2 07-23-2004 12:24 PM
where is LD_LIBRARY_PATH Ninja_212 Slackware 4 10-07-2003 10:41 PM
Log-in: type in user name Micro420 Mandriva 3 09-07-2003 09:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:30 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