Linux - SoftwareThis 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
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.
Hi i am new to linux and i am using Fedora core 2.
I am currently using an API called jrtplib. However when i install it , it install all the library files to a /usr/local/lib . Unfortunatley the the g++ compiler i am using ( not sure which version ) doesnt check that directory when searching for errors ,, so of course a whole lot of "undefined reference errors " arise at compile time .
What i want to know if what modification needs to be made to allow the compiler or whatever is responsible for the aspect , so as to force it too check the usr/local/lib directory rather than onlyt the usr/lib directory.
That doesn't work. I did it. You will have to change your bash or other shell profile. Sorry btmiller, but I had the same advice, from you or someone and it didn't work. It won't stay exported
To make LD_LIBRARY_PATH stay permanent, You have to add it to /etc/profile (system wide) or ~/.bashrc(for user only).
when you add an entry to /etc/ld.so.conf you *MUST* run /sbin/ldconfig (as root) for it to take permanent effect. ldconfig rebuilds the /etc/ld.so.cache file and the /usr/local/lib files will be searched for by the linker. Generally, LD_LIBRARY_PATH is not the best way to go as it is often misused.
When exporting environment variables, like LD_LIBRARY_PATH the following:
export LD_LIBRARY_PATH=/usr/local/lib
sets LD_LIBRARY_PATH only to usr/local/lib - so if the system had say /opt/whatever/lib in its LD_LIBRARY_PATH that would be gone after the above command.
Instead use LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - this sets /usr/local/lib as the first directory LD_LIBRARY_PATH searches and doesn't disturb anything that was previously in its path.
alternatively, export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib set /usr/local/lib as the last directory it searches without disturbing the rest of the path.
But, the right way to do it is add /usr/local/lib to /etc/ld.so.conf and run /sbin/ldconfig and that will correct
your problem.
By the way, if you want to see what ldconfig is finding, run (as root) 'ldconfig -v | more' and you can see exactly what libraries it is finding.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.