![](/img/trans.png)
[英]This application failed to start because it could not find or load the Qt platform plugin “xcb” in “”. AND cannot find /usr/lib/qt5
[英]Could not find the Qt platform plugin xcb, on Qt5 build from source on Linux
我在 Debian 10 32 位上构建 Qt5。 然后我创建了一个最小的 Qt 项目,运行$ ~/qt/qt-everywhere-src-5.12.7/qtbase/bin/qmake project.pro
和make
,但是当我尝试执行应用程序时我 go 如下:
这是怎么回事?
$ ./release/project
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl.
Aborted
更多信息:
$ QT_DEBUG_PLUGINS=1 release/project
QFactoryLoader::QFactoryLoader() checking directory path "/home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqlinuxfb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"linuxfb"
]
},
"archreq": 0,
"className": "QLinuxFbIntegrationPlugin",
"debug": false,
"version": 330752
}
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqminimal.so"
Found metadata in lib /home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"archreq": 0,
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 330752
}
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqoffscreen.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"archreq": 0,
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 330752
}
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqvnc.so"
Found metadata in lib /home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqvnc.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vnc"
]
},
"archreq": 0,
"className": "QVncIntegrationPlugin",
"debug": false,
"version": 330752
}
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqwebgl.so"
Found metadata in lib /home/user/qt/qt-everywhere-src-5.12.7/qtbase/plugins/platforms/libqwebgl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"webgl"
]
},
"archreq": 0,
"className": "QWebGLIntegrationPlugin",
"debug": false,
"version": 330752
}
Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() checking directory path "/home/user/QtProjects/project/release/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl.
Aborted
libqxcb.so
应该在应用程序的platforms
子目录中找到。 如果您想更改其搜索位置,请查看qt.conf ini 文件,该文件控制插件搜索路径以及其他路径
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.