我重新安装了 ubuntu 14.04、Qt 5.4.1 和 Qtcreator.
I reinstalled my ubuntu 14.04 and Qt 5.4.1 and Qtcreator.
Qt 5.4.1 是从源代码构建的,带有-opensource -nomake-test -nomake-example"配置选项.
Qt 5.4.1 was built from source with "-opensource -nomake-test -nomake-example" configure options.
当我在 QtCreator 中打开一个旧项目并构建它时,一切正常.
When I open an old project in QtCreator and build it everything's OK.
但是当我运行这个项目时它显示:
But when I run this project it shows:
此应用程序无法启动,因为它无法找到或加载 Qt 平台插件xcb".
This application failed to start because it could not find or load the Qt platform plugin "xcb".
可用的平台插件有:linuxfb、minimal、offscreen、xcb.
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
重新安装应用程序可能会解决此问题.中止(核心转储)
Reinstalling the application may fix this problem. Aborted (core dumped)
所以我用谷歌搜索了这个问题并尝试了一切.我安装了所有软件包(libxcb 系列)但没有任何帮助!
So I googled this problem and tried everything. I installed every packages (libxcb series) but nothing can help!
请有人帮助我...
我试过你的方法.
当我在 platform
目录中运行 ldd
命令时,它显示:
When I run ldd
command in platform
directory, It shows:
你可以看到什么都没有丢失.实际上我已经在名为 libqxcb.so 的平台目录中创建了一个软链接.之前我的平台目录下没有libqxcb.so.
You can see that nothing is missing. And actually I have made a softlink in the platform directory called libqxcb.so. There was no libqxcb.so in my platform directory before.
当我对我的可执行文件运行 ldd
命令时.表明:
And when I run ldd
command to my executable. it shows:
当我执行这个文件时你可以看到错误.
And you can see the error when I execute this file.
对于类似的问题,在我的情况下,我解决了:
For a similar issue, in my case I solved with:
export QT_PLUGIN_PATH=<qt base path>/plugins
这篇关于(Qt 5.4.1) 此应用程序无法启动,因为它无法找到或加载 Qt 平台插件“xcb".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!