Viktor Simkó Viktor Simkó - 1 year ago 178
C++ Question

Could not find Qt platform plugin 'xcb' on Debian 8.3

I've compiled a simple Qt application on Ubuntu 15.10.

I've created a lib and a platforms folder int the same directory where the executable is.

I've copied,,,,,,, into lib, and into platforms,

then moved the application with the folders to a fresh Debian 8.3 install.

I've also created a script with the following content:


But when I start the application using the script it says that it couldn't find Qt platform plugin 'xcb'...

I've run
on the application itself, and on the also, but it seems, it have found everything...

Answer Source

"platforms" is a subfolder of the plugins directory.

Sample structure


with qt.conf

Prefix = .

In this case, you usually do not need to set QT_QPA_PLATFORM_PLUGIN_PATH.

LD_LIBRARY_PATH can also be avoided if you set the RPATH of ./QtTestApp to $ORIGIN/lib.

Note: it is likely that your application compiled on Ubuntu 15.10 does not run on Debian 8. This is because Ubuntu 15.10 uses a newer version of libc and libstdc++, which is not available on Debian 8. You can work around that issue when you use Ubuntu 14.04 as the compile machine. Then you have approximately this list of compatible target distributions.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download