Linux Binaries and Libraries

To find our which libraries a linux binary uses, run the ldd command against it.

      ldd /usr/bin/top =>  (0x00007fffc6eaf000) => /lib64/ (0x0000003a58000000) => /lib64/ (0x0000003a5b000000) => /lib64/ (0x0000003a57c00000) => /lib64/ (0x0000003a59c00000) => /lib64/ (0x0000003a57800000)
      /lib64/ (0x0000003a57400000)

If you get a “file not found” message, the binary can't find the libabry it requires. Assuming it has been installed, the path can be added to the LD_LIBRARY_PATH variable.

To find out which libraries are known, use ldconfig -p to list them

      ldconfig -p | more
      730 libs found in cache `/etc/' (libc6,x86-64) => /lib64/ (libc6) => /lib/ (libc6,x86-64) => /usr/lib64/xulrunner/ (libc6,x86-64) => /lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/xulrunner/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/ (libc6,x86-64) => /usr/lib64/

As the command indicates, these are the libraries that have been cached. Additional (non default) locations can be added by configuring file /etc/ or adding configuration files to /etc/ . After this ldconfig (with no arguments) must be run to refresh the cache.

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password