(Qt 5.4.1)该应用程序无法启动,因为它无法找到或加载Qt平台插件"xcb". [英] (Qt 5.4.1) This application failed to start because it could not find or load the Qt platform plugin "xcb"
问题描述
我重新安装了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,最小,离屏,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".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!