LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 13.37 no $LD_LIBRARY_PATH for shared libraries. Where is it? (http://www.linuxquestions.org/questions/slackware-14/slackware-13-37-no-%24ld_library_path-for-shared-libraries-where-is-it-4175439141/)

charging-ibis 11-28-2012 10:00 AM

Slackware 13.37 no $LD_LIBRARY_PATH for shared libraries. Where is it?
 
I am currently studying for my Linux+ exam and I was told that slackware is one of the best distros. to use for effectively learning Linux. Now my question is this, why isn't there a environment variable for '$LD_LIBRARY_PATH' for shared libraries? I understand if it isn't broke, don't fix it.... well slackware is interesting to me still. It's just a little off from what the text book is telling me. But could I get some insight on why there isn't a '$LD_LIBRARY_PATH' variable that I think should be there by default? Also What would be the best and effecient way to create a '$LD_LIBRARY_PATH' variable?

- Thanks

Didier Spaier 11-28-2012 10:10 AM

AFAIK LD_LIBRARY_PATH is not used in Slackware.

When a library in a non-standard location (or not) is added, I just add its path to /etc/ld.so.conf if need be and run as root ldconfig.

Not sure if it is the recommended or 'canonical' way but that works.

To know more: 'man ldconfig'.

gnashley 11-28-2012 01:02 PM

LD_LIBRARY_PATH should not be set by default. It is meant to be used as a run-time override to point the linker at libs in nin-standard locations. For instance, it can be used in a wrapper script which sets LD_LIBRARY_PATH before running a program so that the program finds a special version of the lib under LD_LIBRARY_PATH.

charging-ibis 11-28-2012 01:14 PM

Hey thanks for the information. Both Didier Spaier & gnashley.

saulgoode 11-28-2012 03:23 PM

Detailed information about the role LD_LIBRARY_PATH plays in linking can be found by viewing the man page for 'ld-linux'.


All times are GMT -5. The time now is 05:08 PM.