ldd表示“未找到"即使库位于我的LD_LIBRARY_PATH中 [英] ldd says "not found" even though library is in my LD_LIBRARY_PATH

查看:87
本文介绍了ldd表示“未找到"即使库位于我的LD_LIBRARY_PATH中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ ldd libpmsfdcwrt.so
        linux-gate.so.1 =>  (0x004ae000)
        libdl.so.2 => /lib/libdl.so.2 (0x00417000)
        [ ... elided ... ]
        libz.so.1 => not found
        [ ... elided ... ]
        libpmssl.so.0.9.7 (0xf5be8000)
        libfreebl3.so => /usr/lib/libfreebl3.so (0xf5b88000)

请注意未找到libz.so.1 =>".

Note "libz.so.1 => not found".

但是libz.so.1存在:

But libz.so.1 exists:

$ ls -l /lib64/libz.so.1
lrwxrwxrwx 1 root root 13 Apr 25  2013 /lib64/libz.so.1 -> libz.so.1.2.3
$ ls -l /lib64/libz.so.1.2.3
-rwxr-xr-x 1 root root 91096 Oct  3  2012 /lib64/libz.so.1.2.3

而且,该目录在LD_LIBRARY_PATH中列出:

And, that directory is listed in LD_LIBRARY_PATH:

$ echo $LD_LIBRARY_PATH
:/oracle/product/11.2.0/client_1/lib:/opt/CA/CAlib:/usr/local/CAlib:/opt/CA/WorkloadAutomationAE/autosys/lib:/opt/auto/ixpagent/lib:/lib64:/opt/CA/SharedComponents/lib:/usr/lib:/opt/CA/SharedComponents/Csam/SockAdapter/lib

(我注销并重新登录,以确保它保持不变.)

(I logged out and logged back in to be sure it was sticking.)

推荐答案

问题是32位/64位冲突:

The problem was a 32-bit/64-bit collision:

$ file libpmsfdcwrt.so
libpmsfdcwrt.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

$ file /lib64/libz.so.1.2.3
/lib64/libz.so.1.2.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

谢谢大家,为我指明了正确的方向.

Thank you, everyone, for pointing me in the correct direction.

这篇关于ldd表示“未找到"即使库位于我的LD_LIBRARY_PATH中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆