28.16. Specifying the Required Library: ldd

With the command ldd, find out which libraries the dynamic executable specified as argument would be subsequently loaded:

$ ldd /bin/ls
linux-gate.so.1 =>  (0xffffe000)
librt.so.1 => /lib/tls/librt.so.1 (0x4002b000)
libacl.so.1 => /lib/libacl.so.1 (0x40033000)
libselinux.so.1 => /lib/libselinux.so.1 (0x40039000)
libc.so.6 => /lib/tls/libc.so.6 (0x40048000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4015d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libattr.so.1 => /lib/libattr.so.1 (0x4016d000)

Static binaries do not need any dynamic libraries:

$ ldd /bin/rpm
        not a dynamic executable
$ file /bin/rpm
/bin/rpm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), \
      statically linked, stripped