我正在尝试执行一个二进制文件,它显示./xtensoftphone: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
。该库确实安装在 下/usr/lib
。我需要做些什么才能让二进制文件看到该库?我以为所有/usr/lib
库都是可见的。
blaine :: ~/Downloads/xten-xlite » ldd xtensoftphone
linux-gate.so.1 => (0xf7783000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7749000)
libgthread-2.0.so.0 => /usr/lib32/libgthread-2.0.so.0 (0xf7743000)
libglade-2.0.so.0 => /usr/lib32/libglade-2.0.so.0 (0xf772a000)
libgtk-x11-2.0.so.0 => /usr/lib32/libgtk-x11-2.0.so.0 (0xf7355000)
libxml2.so.2 => /usr/lib32/libxml2.so.2 (0xf722b000)
libz.so.1 => /usr/lib32/libz.so.1 (0xf7216000)
libgdk-x11-2.0.so.0 => /usr/lib32/libgdk-x11-2.0.so.0 (0xf7180000)
libatk-1.0.so.0 => /usr/lib32/libatk-1.0.so.0 (0xf7163000)
libgdk_pixbuf-2.0.so.0 => /usr/lib32/libgdk_pixbuf-2.0.so.0 (0xf7149000)
libpangoxft-1.0.so.0 => /usr/lib32/libpangoxft-1.0.so.0 (0xf7141000)
libpangox-1.0.so.0 => /usr/lib32/libpangox-1.0.so.0 (0xf7134000)
libpango-1.0.so.0 => /usr/lib32/libpango-1.0.so.0 (0xf70f1000)
libgobject-2.0.so.0 => /usr/lib32/libgobject-2.0.so.0 (0xf70b1000)
libgmodule-2.0.so.0 => /usr/lib32/libgmodule-2.0.so.0 (0xf70ac000)
libdl.so.2 => /lib32/libdl.so.2 (0xf70a8000)
libglib-2.0.so.0 => /lib32/libglib-2.0.so.0 (0xf6fde000)
libm.so.6 => /lib32/libm.so.6 (0xf6fb8000)
libstdc++.so.5 => not found
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf6f98000)
libc.so.6 => /lib32/libc.so.6 (0xf6e3e000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf6d21000)
/lib/ld-linux.so.2 (0xf7784000)
librt.so.1 => /lib32/librt.so.1 (0xf6d18000)
libpcre.so.3 => /lib32/libpcre.so.3 (0xf6ce7000)
libpangoft2-1.0.so.0 => /usr/lib32/libpangoft2-1.0.so.0 (0xf6cbf000)
libpangocairo-1.0.so.0 => /usr/lib32/libpangocairo-1.0.so.0 (0xf6cb3000)
libgio-2.0.so.0 => /usr/lib32/libgio-2.0.so.0 (0xf6c15000)
libcairo.so.2 => /usr/lib32/libcairo.so.2 (0xf6b9b000)
libfreetype.so.6 => /usr/lib32/libfreetype.so.6 (0xf6b25000)
libfontconfig.so.1 => /usr/lib32/libfontconfig.so.1 (0xf6af4000)
libXext.so.6 => /usr/lib32/libXext.so.6 (0xf6ae4000)
libXrender.so.1 => /usr/lib32/libXrender.so.1 (0xf6ada000)
libXinerama.so.1 => /usr/lib32/libXinerama.so.1 (0xf6ad6000)
libXi.so.6 => /usr/lib32/libXi.so.6 (0xf6ac8000)
libXrandr.so.2 => /usr/lib32/libXrandr.so.2 (0xf6abf000)
libXcursor.so.1 => /usr/lib32/libXcursor.so.1 (0xf6ab5000)
libXcomposite.so.1 => /usr/lib32/libXcomposite.so.1 (0xf6ab1000)
libXdamage.so.1 => /usr/lib32/libXdamage.so.1 (0xf6aad000)
libXfixes.so.3 => /usr/lib32/libXfixes.so.3 (0xf6aa7000)
libXft.so.2 => /usr/lib32/libXft.so.2 (0xf6a92000)
libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf6a78000)
libresolv.so.2 => /lib32/libresolv.so.2 (0xf6a64000)
libselinux.so.1 => /lib32/libselinux.so.1 (0xf6a49000)
libpixman-1.so.0 => /usr/lib32/libpixman-1.so.0 (0xf69ee000)
libdirectfb-1.2.so.0 => /usr/lib32/libdirectfb-1.2.so.0 (0xf6977000)
libfusion-1.2.so.0 => /usr/lib32/libfusion-1.2.so.0 (0xf696d000)
libdirect-1.2.so.0 => /usr/lib32/libdirect-1.2.so.0 (0xf6957000)
libpng12.so.0 => /lib32/libpng12.so.0 (0xf6932000)
libxcb-render-util.so.0 => /usr/lib32/libxcb-render-util.so.0 (0xf692c000)
libxcb-render.so.0 => /usr/lib32/libxcb-render.so.0 (0xf6924000)
libexpat.so.1 => /lib32/libexpat.so.1 (0xf68fd000)
libXau.so.6 => /usr/lib32/libXau.so.6 (0xf68f9000)
libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf68f3000)
blaine :: ~/Downloads/xten-xlite » cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
答案1
/usr/lib/libstdc++.so.5
除了 之外,您真的还有 吗/usr/lib/libstdc++.so.6
?这两者不兼容(也就是说,需要一个的程序无法与另一个一起工作,当然您可以同时安装两者)。您需要安装libstd++5
包裹。
Ubuntu 10.04 不再有libstdc++5
,但如果你需要它,你可以从backports 存储库。它在后续版本中被重新引入。
答案2
ldconfig
每次更改库后都需要运行。如果有疑问,只需运行它,运行太频繁也不会有什么坏处。
如果这不能解决问题,请发布 的输出ldd xtensoftphone
和 的内容/etc/ld.so.conf
(以及 下的任何文件/etc/ld.so.conf.d
),然后我们再看看。
答案3
尝试将库的位置添加到 LD_LIBRARY_PATH