linuxlinkerldd

How to find out where a program is looking for libraries


The other day I came across a linux command that let me see where a program is expecting to find its libraries. It is very useful to solve library dependency problems for not so popular or proprietary software. I used ldd, it was very informative, but missed one crucial piece of information for me:

ldd -v ./my_executable

gave good information for libraries that my_executable can link to. But for those it can not link/find, ldd only gave information like:

<a_library_name.so.version> => not found

What I want is, instead of "not found", I want to see

not found at /path/to/<a_library_name.so.version>.


Solution

  • Probably you need the strace command Take a look here http://www.thegeekstuff.com/2011/11/strace-examples/