繁体   English   中英

ldd找不到xerces的共享对象(.so)

[英]ldd not finding shared object (.so) for xerces

我试图运行Xalan C ++库提供的示例可执行文件,它需要Xerces C库。 但是我无法正确链接Xerces共享对象文件。

mike@ubuntu:~/Xalan-C_1_9_0-redhat_80-gcc_32/bin$ ldd SimpleXPathAPI 
    linux-gate.so.1 =>  (0xf7765000)
    libxalan-c.so.19 => /home/mike/Xalan-C_1_9_0-redhat_80-gcc_32/lib/libxalan-c.so.19 (0xf7409000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf73ab000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf738e000)
    libxerces-c.so.26 => not found
    libxalanMsg.so.19 => /home/mike/Xalan-C_1_9_0-redhat_80-gcc_32/lib/libxalanMsg.so.19 (0xf7386000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf71d8000)
    /lib/ld-linux.so.2 (0xf7768000)
    libstdc++.so.5 => not found
    libxerces-c.so.26 => not found

我在LD_LIBRARY_PATH包含了包含libxerces-c.so的位置,但ldd找不到它。

mike@ubuntu:~/Xalan-C_1_9_0-redhat_80-gcc_32/bin$ echo $LD_LIBRARY_PATH
    /home/mike/Xalan-C_1_9_0-redhat_80-gcc_32/lib:/usr/local/lib

我什至添加了一个软链接以确保包含.26

mike@ubuntu:/usr/local/lib$ ls -l
total 98308
-rwxr-xr-x 1 root root  25560971 Aug 28 13:39 libxerces-c-3.1.so
-rw-r--r-- 1 root root  75080734 Aug 28 13:39 libxerces-c.a
-rwxr-xr-x 1 root root       962 Aug 28 13:39 libxerces-c.la
lrwxrwxrwx 1 root root        18 Aug 28 13:39 libxerces-c.so -> libxerces-c-3.1.so
lrwxrwxrwx 1 root root        14 Oct 21 10:31 libxerces-c.so.26 -> libxerces-c.so
drwxr-xr-x 2 root root      4096 Aug 28 13:39 pkgconfig
drwxrwsr-x 4 root staff     4096 Feb 18  2015 python2.7
drwxrwsr-x 3 root staff     4096 Feb 18  2015 python3.4
drwxr-xr-x 3 root root      4096 Jul  6 15:42 site_ruby

我第一次在libxalan-c.so.19遇到此=> not found问题,我通过将该文件的位置添加到LD_LIBRARY_PATH来解决了该问题。 因此,我无法弄清楚为什么相同的修补程序不能用于libxerces-c.so.26 有人知道我在做什么错吗?

这会产生什么:

cd /usr/local/lib
file -L ./libxerces-c.so.26

可能会打印类似ELF 64-bit LSB shared object ... ,在这种情况下,您尝试将32位可执行文件指向64位库, 但这不起作用。

您需要下载libxerces的32位版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM