ldd在LD_LIBRARY_PATH中找不到库 [英] ldd can't find library in LD_LIBRARY_PATH
问题描述
我正在尝试启动和运行系统,并且在OpenMotif共享库方面遇到问题.我的目录位于LD_LIBRARY_PATH,但仍然找不到它们.
I'm trying to get a system up and running, and am having problems with the OpenMotif shared libraries. I have their directory in LD_LIBRARY_PATH, but it still can't find them.
这是一个例子:
[root@intrepid netcool]# ldd /opt/netcool/omnibus/platform/linux2x86/bin/nco_* |grep 'not found'
libXm.so.3 => not found
libXpm.so.4 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXpm.so.4 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXm.so.3 => not found
[root@intrepid netcool]# find /usr/ -name libXm.so.3
/usr/lib64/libXm.so.3
[root@intrepid netcool]# find /usr/ -name libXpm.so.4
/usr/lib64/libXpm.so.4
[root@intrepid netcool]# echo $LD_LIBRARY_PATH
/opt/netcool/omnibus//platform/linux2x86/lib/:/opt/netcool//platform/linux2x86/lib/:/usr/lib/:/usr/lib64/
我可能正在做一些愚蠢的事情,但我想不出要尝试的其他事情.
I'm probably doing something stupid, but I can't think of anything else to try.
要回答以下几个问题:
[root@intrepid netcool]# export LD_LIBRARY_PATH
[root@intrepid netcool]# ldd /opt/netcool/omnibus/platform/linux2x86/bin/nco_* |grep 'not found'
libXm.so.3 => not found
libXpm.so.4 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXpm.so.4 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXm.so.3 => not found
[root@intrepid netcool]# ldconfig
[root@intrepid netcool]# ldd /opt/netcool/omnibus/platform/linux2x86/bin/nco_* |grep 'not found'
libXm.so.3 => not found
libXpm.so.4 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXpm.so.4 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXm.so.3 => not found
libXm.so.3 => not found
好吧,刚尝试运行其中一个可执行文件:
Ok, just tried to run one of the executables:
# ./bin/nco_xigen
/opt/netcool//omnibus/platform/linux2x86/bin/nco_xigen: error while loading shared libraries: libXm.so.3: wrong ELF class: ELFCLASS64
这是32位/64位的东西吗?
Is this a 32 bit/64 bit thing?
推荐答案
我所用的二进制文件正在寻找共享库的32位版本,而我安装了64位.愚蠢的错误. LDD不会产生非常有见地的错误消息,但是当我尝试运行它时,二进制文件会产生错误消息.
The binaries I had were looking for the 32-bit versions of the shared libraries, I had the 64-bit installed. Stupid mistake. LDD didn't produce a very insightful error message, but the binary did when I tried to run it.
这篇关于ldd在LD_LIBRARY_PATH中找不到库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!