Shared Libraries on Linux

Fun = figuring out shared library deps on linux.  Not…

This useful article (Program Library-HOWTO) talks about how lib files are discovered and what you can do to force them to be found.

LD_LIBRARY_PATH which I’ve seen many times before, allows you to specify a library ahead of others so you can do

LD_LIBRARY_PATH=.:/my/better/lib.so:$LD_LIBRARY_PATH

If you want to see which libraries a process is using then do

ldd /path/to/your/process

There is still a magic to how those libraries then link off and refer to others but this is considerably more than I knew 24 hours ago 🙂

Leave a Reply