29.4. 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)
		





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
JavaScript
dyld: Library not loaded:解决办法
dyld: Library not loaded:解决办法
523 1
|
Linux
linux运行protoc出现错误 while loading shared libraries: libprotoc.so.19
linux运行protoc出现错误 while loading shared libraries: libprotoc.so.19
146 0
|
Android开发
【错误记录】NDK 动态库报错 ( dlopen failed: file offset for the library /lib/arm64/libwebp.so“ >= file size:0)
【错误记录】NDK 动态库报错 ( dlopen failed: file offset for the library /lib/arm64/libwebp.so“ >= file size:0)
463 0
【错误记录】NDK 动态库报错 ( dlopen failed: file offset for the library /lib/arm64/libwebp.so“ >= file size:0)
|
Linux C++
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found问题解决方法
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found问题解决方法
2164 0
|
IDE 开发工具 数据库
STM32bug【 KEILMDK中出现The Project references devices, files or libraries that are not installed】
STM32bug【 KEILMDK中出现The Project references devices, files or libraries that are not installed】
277 0
如何解决:./real.exe: error while loading shared libraries: libhdf5hl_fortran.so.100: cannot open shared
如何解决:./real.exe: error while loading shared libraries: libhdf5hl_fortran.so.100: cannot open shared
如何解决:./real.exe: error while loading shared libraries: libhdf5hl_fortran.so.100: cannot open shared
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)Call Stack
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)Call Stack
498 0
MAC编译lame ld: symbol(s) not found for architecture x86_64/_lame_init_old“, referenced from
MAC编译lame ld: symbol(s) not found for architecture x86_64/_lame_init_old“, referenced from
256 0
symbol lookup error: /home/quantum6/build_libs/lib/libreadline.so.7: undefined symbol: UP
symbol lookup error: /home/quantum6/build_libs/lib/libreadline.so.7: undefined symbol: UP
128 0
原因及解决办法:error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file
原因及解决办法:error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file
420 0