Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | Email

29.5.  ldd - print shared library dependencies

$ ldd /bin/ls
        linux-gate.so.1 =>  (0xffffe000)
        librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7f13000)
        libacl.so.1 => /lib/libacl.so.1 (0xb7f0d000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xb7ef9000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7dc4000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7db1000)
        /lib/ld-linux.so.2 (0xb7f22000)
        libattr.so.1 => /lib/libattr.so.1 (0xb7dad000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7da9000)
        libsepol.so.1 => /lib/libsepol.so.1 (0xb7d6c000)
$
		

举例

# ./boinc
./boinc: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

# ldd ./boinc | grep libssl
./boinc: /lib64/libcurl.so.4: no version information available (required by ./boinc)
	libssl.so.1.0.0 => not found
	libssl3.so => /lib64/libssl3.so (0x00007f1f46998000)
	libssl.so.10 => /lib64/libssl.so.10 (0x00007f1f44ba1000)