且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法找到或加载Qt平台插件"xcb",在Archlinux上(写!AppImage)

更新时间:2022-03-18 20:42:57

在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