无法找到或加载Qt平台插件"xcb",在Archlinux上(写!AppImage) [英] Could not find or load the Qt platform plugin "xcb" on Archlinux (Write! AppImage)
问题描述
尝试安装Write!在安装了qt5,freetype2 2.9.1和fontconfig 2:2.13.1 + 12 + g5f5ec56-1的Arch Linux上的AppImage
Trying to install the Write! AppImage on Arch Linux with qt5 installed, freetype2 2.9.1 and fontconfig 2:2.13.1+12+g5f5ec56-1
[levi@astize Write!]$ ./write
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
使用QT_DEBUG_PLUGINS=1
[levi@astize Write!]$ ./write
QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_unuY6s/usr/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/tmp/.mount_unuY6s/usr/plugins/platforms/libqxcb.so"
Found metadata in lib /tmp/.mount_unuY6s/usr/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 329989
}
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_unuY6s/usr/bin/platforms" ...
Cannot load library /tmp/.mount_unuY6s/usr/plugins/platforms/libqxcb.so: (/usr/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var)
QLibraryPrivate::loadPlugin failed on "/tmp/.mount_unuY6s/usr/plugins/platforms/libqxcb.so" : "Cannot load library /tmp/.mount_unuY6s/usr/plugins/platforms/libqxcb.so: (/usr/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var)"
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
任何帮助将不胜感激.
推荐答案
在Qt中编译c ++应用并将其部署到生产计算机后,我一直在为这个错误而苦苦挣扎.这是我为解决此问题所做的一些事情.
I was struggling with this error after compiling a c++ app in Qt and deploying it to a production machine. Here are some things I did to resolve the issue.
-
安装Qt库.我的被安装在我的开发机器上的
~/Qt/5.9.8/gcc_64/lib/
中.我只是简单地将此目录复制到生产机器.
Install the Qt libs. Mine were installed in
~/Qt/5.9.8/gcc_64/lib/
on my dev machine. I simply copied this directory to the production machine.
使用ldd -v /path/to/your/app
查找并解决缺少库的问题.
Use ldd -v /path/to/your/app
to find and resolve issues with missing libs.
设置环境变量:
LD_LIBRARY_PATH=~/Qt/5.9.8/gcc_64/lib/:/path/to/any/custom/libs/for/your/app
QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
这篇关于无法找到或加载Qt平台插件"xcb",在Archlinux上(写!AppImage)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!