gpt4 book ai didi

c++ - Qt5.1加载平台插件xcb失败

转载 作者:可可西里 更新时间:2023-11-01 16:31:06 26 4
gpt4 key购买 nike

我使用的是 ubuntu 12.04 和 qt5.1。我编译我的项目没有错误,但是当我尝试在其他机器上启动我的应用程序时,我收到以下错误:

Failed to load platform plugin "xcb". Available platforms are:

Annullato (core dump creato)

我将所需的库添加到 ld_library_path:

linux-gate.so.1 =>  (0xb7705000)
libQt5Widgets.so.5 => /home/computer/libs/libQt5Widgets.so.5 (0xb70c4000)
libQt5Core.so.5 => /home/computer/libs/libQt5Core.so.5 (0xb6c42000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6b5c000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6b3e000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6995000)
libQt5Gui.so.5 => /home/computer/libs/libQt5Gui.so.5 (0xb652a000)
libpthread.so.0 => /home/computer/libs/libpthread.so.0 (0xb650f000)
libgobject-2.0.so.0 => /home/computer/libs/libgobject-2.0.so.0 (0xb64bf000)
libglib-2.0.so.0 => /home/computer/libs/libglib-2.0.so.0 (0xb63c6000)
libX11.so.6 => /home/computer/libs/libX11.so.6 (0xb6292000)
libm.so.6 => /home/computer/libs/libm.so.6 (0xb6266000)
libicui18n.so.51 => /home/computer/libs/libicui18n.so.51 (0xb6044000)
libicuuc.so.51 => /home/computer/libs/libicuuc.so.51 (0xb5eca000)
libdl.so.2 => /home/computer/libs/libdl.so.2 (0xb5ec5000)
libgthread-2.0.so.0 => /home/computer/libs/libgthread-2.0.so.0 (0xb5ec2000)
librt.so.1 => /home/computer/libs/librt.so.1 (0xb5eb9000)
/lib/ld-linux.so.2 (0xb7706000)
libGL.so.1 => /home/computer/libs/libGL.so.1 (0xb5e5a000)
libffi.so.6 => /home/computer/libs/libffi.so.6 (0xb5e52000)
libpcre.so.3 => /home/computer/libs/libpcre.so.3 (0xb5e16000)
libxcb.so.1 => /home/computer/libs/libxcb.so.1 (0xb5df5000)
libicudata.so.51 => /home/computer/libs/libicudata.so.51 (0xb48ac000)
libglapi.so.0 => /home/computer/libs/libglapi.so.0 (0xb4895000)
libXext.so.6 => /home/computer/libs/libXext.so.6 (0xb4882000)
libXdamage.so.1 => /home/computer/libs/libXdamage.so.1 (0xb487e000)
libXfixes.so.3 => /home/computer/libs/libXfixes.so.3 (0xb4878000)
libX11-xcb.so.1 => /home/computer/libs/libX11-xcb.so.1 (0xb4875000)
libxcb-glx.so.0 => /home/computer/libs/libxcb-glx.so.0 (0xb485d000)
libXxf86vm.so.1 => /home/computer/libs/libXxf86vm.so.1 (0xb4856000)
libdrm.so.2 => /home/computer/libs/libdrm.so.2 (0xb4849000)
libXau.so.6 => /home/computer/libs/libXau.so.6 (0xb4845000)
libXdmcp.so.6 => /home/computer/libs/libXdmcp.so.6 (0xb483e000)

但它不起作用。有什么问题吗?

我也尝试使用选项 -qt-xcb 重新配置 qt,但它仍然不起作用。

附言。抱歉我的英语不好

最佳答案

请下载这个包:

sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev

您可以使用以下方法检查它为何不起作用:

export QT_DEBUG_PLUGINS=1

并在终端中运行您的应用

如果不行试试

locate libxcb.so.1

并将这条路径写入

export LD_LIBRARY_PATH=/**MY_PATH**:$LD_LIBRARY_PATH

关于c++ - Qt5.1加载平台插件xcb失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17826862/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com