LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   /usr/local/lib not searched for shared objects in Redhat/Fedora? (https://www.linuxquestions.org/questions/programming-9/usr-local-lib-not-searched-for-shared-objects-in-redhat-fedora-366094/)

Arodef 09-22-2005 08:29 PM

/usr/local/lib not searched for shared objects in Redhat/Fedora?
 
I often get compiler errors since the shared objects in /usr/local/lib cannot be seen. Does anyone know why Redhat/Fedora performs that way? Is it a bug?

What's the best way to fix this without screwing up my system? Is it okay to add /usr/local/lib to ld.so.conf? Or when I install those libraries should I override the default installation directory and change it to /usr/lib? Or is there a better solution? Thanks!

btmiller 09-22-2005 11:28 PM

You can add the path to /etc/ld.so.conf and then rerun ldconfig. An alternative if you're worried is to simply add /usr/local/lib to your LD_LIBRARY_PATH environment variable. That will only affect your user, though (and just your current session, unless you set it in your shell startup files).

primo 09-23-2005 12:44 AM

From the "Library HOWTO":
Quote:

Many Red Hat-derived distributions don't normally include /usr/local/lib in the file /etc/ld.so.conf. I consider this a bug, and adding /usr/local/lib to /etc/ld.so.conf is a common ``fix'' required to run many programs on Red Hat-derived systems.
http://www.tldp.org/HOWTO/Program-Li...libraries.html


All times are GMT -5. The time now is 03:51 PM.