我有一个二进制文件,其中ldd显示了意外的依赖项和libicuuc(来自“ icu”)。
#ldd A
[...]
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007faaf9722000)
libicuuc.so.49 => /usr/lib64/libicuuc.so.49 (0x00007faaf5689000)
由于在该系统上libxml动态依赖于libicuuc,因此ldd最终会找到它是有意义的,但是是否期望libicuuc也出现在A的ldd输出中?是否有一些命令仅检索链接为依赖项依赖关系的库?
ldd
显示启动应用程序或加载共享库时需要加载的所有库。
readelf -d
仅显示二进制文件的直接依赖项。
$ readelf -d /opt/google/chrome/chrome | grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libX11.so.6]
0x0000000000000001 (NEEDED) Shared library: [libXrandr.so.2]
0x0000000000000001 (NEEDED) Shared library: [libXrender.so.1]
0x0000000000000001 (NEEDED) Shared library: [libXss.so.1]
0x0000000000000001 (NEEDED) Shared library: [libXext.so.6]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libgobject-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgthread-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libglib-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgtk-x11-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgdk-x11-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libatk-1.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgdk_pixbuf-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libpangocairo-1.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libcairo.so.2]
0x0000000000000001 (NEEDED) Shared library: [libpango-1.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libfreetype.so.6]
0x0000000000000001 (NEEDED) Shared library: [libfontconfig.so.1]
0x0000000000000001 (NEEDED) Shared library: [libnss3.so]
0x0000000000000001 (NEEDED) Shared library: [libnssutil3.so]
0x0000000000000001 (NEEDED) Shared library: [libsmime3.so]
0x0000000000000001 (NEEDED) Shared library: [libplc4.so]
0x0000000000000001 (NEEDED) Shared library: [libnspr4.so]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgconf-2.so.4]
0x0000000000000001 (NEEDED) Shared library: [libdbus-1.so.3]
0x0000000000000001 (NEEDED) Shared library: [libXcomposite.so.1]
0x0000000000000001 (NEEDED) Shared library: [libasound.so.2]
0x0000000000000001 (NEEDED) Shared library: [libXfixes.so.3]
0x0000000000000001 (NEEDED) Shared library: [libcups.so.2]
0x0000000000000001 (NEEDED) Shared library: [libgcrypt.so.11]
0x0000000000000001 (NEEDED) Shared library: [libbz2.so.1.0]
0x0000000000000001 (NEEDED) Shared library: [libexpat.so.1]
0x0000000000000001 (NEEDED) Shared library: [libudev.so.0]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
$ ldd /opt/google/chrome/chrome
linux-vdso.so.1 => (0x00007fff9d3ff000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f93186dc000)
libXrandr.so.2 => /lib64/libXrandr.so.2 (0x00007f93184d3000)
libXrender.so.1 => /lib64/libXrender.so.1 (0x00007f93182c9000)
libXss.so.1 => /lib64/libXss.so.1 (0x00007f93180c5000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f9317eb2000)
librt.so.1 => /lib64/librt.so.1 (0x00007f9317caa000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9317aa6000)
libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f9317858000)
libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f9317656000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f9317336000)
libgtk-x11-2.0.so.0 => /lib64/libgtk-x11-2.0.so.0 (0x00007f9316cbf000)
libgdk-x11-2.0.so.0 => /lib64/libgdk-x11-2.0.so.0 (0x00007f9316a00000)
libatk-1.0.so.0 => /lib64/libatk-1.0.so.0 (0x00007f93167de000)
libgdk_pixbuf-2.0.so.0 => /lib64/libgdk_pixbuf-2.0.so.0 (0x00007f93165bb000)
libpangocairo-1.0.so.0 => /lib64/libpangocairo-1.0.so.0 (0x00007f93163ae000)
libcairo.so.2 => /lib64/libcairo.so.2 (0x00007f9316103000)
libpango-1.0.so.0 => /lib64/libpango-1.0.so.0 (0x00007f9315eb7000)
libfreetype.so.6 => /usr/lib64/freetype-freeworld/libfreetype.so.6 (0x00007f9315c15000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f93159e0000)
libnss3.so => /lib64/libnss3.so (0x00007f93156a4000)
libnssutil3.so => /lib64/libnssutil3.so (0x00007f9315479000)
libsmime3.so => /lib64/libsmime3.so (0x00007f931524c000)
libplc4.so => /lib64/libplc4.so (0x00007f9315046000)
libnspr4.so => /lib64/libnspr4.so (0x00007f9314e09000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9314bed000)
libgconf-2.so.4 => /lib64/libgconf-2.so.4 (0x00007f93149bc000)
libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007f9314778000)
libXcomposite.so.1 => /lib64/libXcomposite.so.1 (0x00007f9314575000)
libasound.so.2 => /lib64/libasound.so.2 (0x00007f9314294000)
libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f931408e000)
libcups.so.2 => /lib64/libcups.so.2 (0x00007f9313e33000)
libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x00007f9313bba000)
libbz2.so.1.0 => not found
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f9313991000)
libudev.so.0 => /lib64/libudev.so.0 (0x00007f9313782000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f931347f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9313184000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f9312f6e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9312bb7000)
/lib64/ld-linux-x86-64.so.2 (0x0000003c7a000000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f9312999000)
libffi.so.5 => /lib64/libffi.so.5 (0x00007f9312790000)
libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f931258c000)
libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f931223f000)
libpangoft2-1.0.so.0 => /lib64/libpangoft2-1.0.so.0 (0x00007f9312012000)
libXinerama.so.1 => /lib64/libXinerama.so.1 (0x00007f9311e0f000)
libXi.so.6 => /lib64/libXi.so.6 (0x00007f9311c00000)
libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007f93119f4000)
libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007f93117f1000)
libpng15.so.15 => /lib64/libpng15.so.15 (0x00007f93115c7000)
libpixman-1.so.0 => /lib64/libpixman-1.so.0 (0x00007f9311340000)
libz.so.1 => /lib64/libz.so.1 (0x00007f9311129000)
libplds4.so => /lib64/libplds4.so (0x00007f9310f24000)
libdbus-glib-1.so.2 => /lib64/libdbus-glib-1.so.2 (0x00007f9310cfd000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f9310ab8000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f93107d3000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f93105a8000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f93103a3000)
libgnutls.so.26 => /lib64/libgnutls.so.26 (0x00007f93100eb000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f930fee7000)
libavahi-common.so.3 => /lib64/libavahi-common.so.3 (0x00007f930fcd9000)
libavahi-client.so.3 => /lib64/libavahi-client.so.3 (0x00007f930fac8000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f930f891000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f930f68c000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f930f46b000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f930f251000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f930f046000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f930ee42000)
libtasn1.so.3 => /lib64/libtasn1.so.3 (0x00007f930ec31000)
libp11-kit.so.0 => /lib64/libp11-kit.so.0 (0x00007f930ea1e000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f930e7b3000)
是否有一些命令仅检索链接为依赖项依赖关系的库?
您可以设置ldd
和readelf -d
输出的差。
编写的PHP扩展需要需要依赖另外一个扩展,在PHP-X中可以调用Extension->require来实现。 PHPX_EXTENSION() { Extension *ext = new Extension("test", "0.0.1"); ext->require("swoole"); ext->require("sockets"); return ext;
依赖关系 这是一个非常轻量级的模块,没有其他依赖项。希望大家在JVM或Android上使用以太坊的RLP编码的项目时会选择使用这个模块,而不再编写自己的实现。
依赖关系 ABI一个非常轻量级的模块,唯一的第三方依赖是 Bouncy Castle,用于hash加密 (Spongy Castle on Android)。 最后希望java和安卓开发者,在JVM或Android上有以太坊ABI合作的项目时会选择使用这个模块,而不是再编写自己的实现。
问题内容: 我有一个依赖关系如下: 当我部署一切正常时,这将拉下另一个引发ClassDefNotFound的依赖项。 我添加了两个依赖项,如下所示: 并且仍然面临着同样的问题,即:MVN带来下来不 我该如何解决? 编辑: 添加; 问题答案: 您可能有一个传递依赖项,另一个依赖项取决于您不需要的版本。 要获得所有直接和传递依赖关系的概述,请尝试: mvn依赖项:树 如果您发现同一依赖项的不同版本之间
问题内容: 我正在运行一个依赖groovy 1.7-beta-1的项目。gmaven插件使用groovy 1.6版作为依赖项。在pom中,我在依赖性管理部分中将grooyv-all版本指定为: 但是,当我在调试模式下运行maven时,我看到groovy 1.6被用于对gmaven插件的依赖。我以为我的依赖项管理部分会重写此设置,因此它们都使用1.7-beta-1,但是由于常规版本不同,我遇到了错误
使用Zookeeper依赖关系 Spring Cloud Zookeeper可以让您提供应用程序的依赖关系作为属性。作为依赖关系,您可以了解Zookeeper中注册的其他应用程序,您可以通过Feign(REST客户端构建器)以及Spring RestTemplate呼叫。 您还可以从Zookeeper依赖关系观察者功能中受益,这些功能可让您控制和监视依赖关系的状态,并决定如何处理。 如何激活Zoo