問題描述
我重新安裝了 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".的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!