将qt链接到所需的libstd ++。so.6的问题

时间:2018-09-10 20:26:26

标签: linux qt

我的qt有一些问题。首先,我在计算机上安装了2个libstd ++版本,默认是一个版本,它位于/usr/lib/x86_64-linux-gnu/libc.so.6中,另一个位于/usr/lib64/libc.so.6中。 。我这样做不是因为这是我的目标,而是为了指导该qt。在运行qt的.sh中,将导出行的行传递到/ usr / lib64,但执行时出现错误:此应用程序无法启动,因为找不到或加载Qt平台插件“ xcb” 在“”中。在阅读有关堆栈溢出的此问题的文章后: "Failed to load platform plugin "xcb" " while launching qt5 app on linux without qt installed,按照编写的步骤进行了所有操作,但ldd没给我显示任何问题:

/opt/qt5/plugins/platforms# ldd libqxcb.so
linux-vdso.so.1 =>  (0x00007ffdbbfac000)
libQt5XcbQpa.so.5 =>/opt/qt5/plugins/platforms/./../../lib/libQt5XcbQpa.so.5 (0x00007f46683f2000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f46681d4000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4667fca000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f4667cd2000)
libQt5Gui.so.5 => /opt/qt5/plugins/platforms/./../../lib/libQt5Gui.so.5 (0x00007f466772b000)
libQt5DBus.so.5 => /opt/qt5/plugins/platforms/./../../lib/libQt5DBus.so.5 (0x00007f46676a7000)
libQt5Core.so.5 => /opt/qt5/plugins/platforms/./../../lib/libQt5Core.so.5 (0x00007f46670ee000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f4666e59000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4666c3b000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f46668ff000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f46666fd000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f46664ec000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f46662ca000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f466608c000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f4665de2000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f4665ad7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f46657da000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f46655c3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4665202000)
/lib64/ld-linux-x86-64.so.2 (0x00005597c073c000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f4664fc4000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f4664d7e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4664b79000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f466494f000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f4664724000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f4664511000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f466430f000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f4664109000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f4663ef0000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f4663ceb000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f4663ae8000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f46638e4000)
libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f46636d6000)
libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f46634cf000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f46632c4000)
libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f46630c0000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f4662eba000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f4662cb6000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f4662ab0000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f46628a2000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f466269e000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f4662499000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4662280000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f4662059000)       

它找到了所有库。 我在其之前添加了导出LD_LIBRARY_PATH=/usr/lib64

如果我不这样做,ldd会告诉我libstd ++。so.6中的某些功能不存在。因为默认情况下它使用第一个默认目录。如何解决?

0 个答案:

没有答案