I reinstalled my ubuntu 14.04 and Qt 5.4.1 and Qtcreator.
Qt 5.4.1 was built from source with "-opensource -nomake-test -nomake-example" configure options.
When I open an old project in QtCreator and build it everything's OK.
But when I run this project it shows:
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem. Aborted (core dumped)
So I googled this problem and tried everything. I installed every packages (libxcb series) but nothing can help!
Somebody help me please...
I tried your methods.
When I run ldd
command in platform
directory, It shows:
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.
And when I run ldd
command to my executable. it shows:
And you can see the error when I execute this file.
On Linux, the xcb QPA (Qt Platform Abstraction) platform plugin is used. It provides the basic functionality needed by Qt GUI and Qt Widgets to run against X11. Its library dependencies are described the following table.
Many people reported that “This application failed to start because it could not find or load the Qt platform plugin Windows” error mainly occurs after installing a series of Windows updates. If this scenario applies to you, you can try performing a system restore or uninstalling these updates manually.
Note: You can install only plugins that are supported by your Qt Creator version. To install plugins: Select Help > About Plugins > Install Plugins. In the Source dialog, enter the path to the archive or library that contains the plugin.
For a similar issue, in my case I solved with:
export QT_PLUGIN_PATH=<qt base path>/plugins
Try to go to the platforms
folder of the Qt installation your program is using and run ldd libqxcb.so
in a command prompt. Then check in the output if there are any missing dependencies. If the libqxcb.so
is missing one of its dependencies this produces the output you mentioned.
You can also use the ldd
command on your executable to check if there are any dependencies that can not be found.
Here is an example of what missing dependencies look like in the ldd
output:
PS: the accepted answer of this question might also help you (creating a qt.conf file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With