is there a way not to type LD_LIBRARY_PATH referring to the *.so everytime you log on
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
(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...
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?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.