ldd shows multiple versions of a library are linked

219 篇文章 2 订阅

https://access.redhat.com/solutions/116133

 SOLUTION 已验证 - 已更新 2017年九月9日06:30 - 

English 

环境

  • Red Hat Enterprise Linux (RHEL)

问题

The output of ldd will show multiple versions of the same library are linked:

Raw

$ ldd somebinary
...
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003205400000)
libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x00002b92d95c4000)
...

决议

This is the expected behavior with multiple library dependencies.

根源

This can occur when a library that the binary is linked to is itself linked to a different version of one of the libraries that the binary is linked to.

For example:

Raw

$ ldd -r -v -d somebinary
        ...
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003205400000)
        libicuuc.so.32 => /usr/lib64/libicuuc.so.32 (0x00002b8e8d0dc000)
        ...

        Version information:
        /usr/lib64/libicuuc.so.32:
                libgcc_s.so.1 (GCC_3.0) => /lib64/libgcc_s.so.1
                libstdc++.so.5 (GLIBCPP_3.2) => /usr/lib64/libstdc++.so.5
                libstdc++.so.5 (CXXABI_1.2) => /usr/lib64/libstdc++.so.5
                libm.so.6 (GLIBC_2.2.5) => /lib64/libm.so.6
                libpthread.so.0 (GLIBC_2.2.5) => /lib64/libpthread.so.0
                libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6

诊断步骤

To get the full ldd listing:

Raw

ldd -r -v -d somebinary
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值