出于学术目的,我安装了QT-everywhere 5.15开源版,但是运行程序失败了。
首先,我使用make
编译了必要的源文件并安装了QT Creator,然后我选择在其中运行程序的qmake。当我尝试运行示例程序时,遇到了以下错误:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/usr/lib/x86-64-linux-gnu"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
The program has unexpectedly finished.
The process was ended forcefully.
我查看了/usr/lib/x86-64-linux-gnu
,寻找xcb插件,并设置LD_LIBRARY_PATH=/usr/lib/x86-64-linux-gnu
,但是同样的错误再次出现。
应该怎么做才能解决这个问题?
/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
?这是它应该在的地方。 - ypnosQT_DEBUG_PLUGINS=1 /path/your/app
。同时,指出您用于编译Qt的命令也是很好的。 - eyllanesc