compiling – Where do executables look for shared objects at runtime? – Unix & Linux Stack Exchange
Posted by jpluimers on 2019/04/30
Thanks Gilles for answering [WayBack] compiling – Where do executables look for shared objects at runtime? – Unix & Linux Stack Exchange.
Abstract:
In a nutshell, when it’s looking for a dynamic library (
.sofile) the linker tries:
- directories listed in the
LD_LIBRARY_PATHenvironment variable (DYLD_LIBRARY_PATHon OSX);- directories listed in the executable’s rpath;
- directories on the system search path, which (on Linux at least) consists of the entries in
/etc/ld.so.confplus/liband/usr/lib.
–jeroen






Leave a comment