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.
'This application failed to start because it could not find or load the Qt platform plugin "xcb".'
See the accompanying web page, scroll down to heading "Qt Plugins". See first paragraph.
libqxcb.so is required, even if you link the rest statically.
http://doc.qt.io/qt-5/linux-deployment.html#application-dependencies
Qt have probably written their source code software to work in the following way: Instead of allowing libqxcb.so to be loaded at startup automatically (using rpath's) they use a dlopen() function to load it, as part of their QPA function set, soon after main() begins.
So this completely disregards our attempt to include all the "xcb" functions statically.
If their dlopen() fails they just trot out their error message we all know and hate, and then call signal 6 to abort it (quite unnecessarily) instead of exiting normally.
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).
For a similar issue, in my case I solved with:
export QT_PLUGIN_PATH=<qt base path>/plugins