There is a Qt5 app (Musescore), that I am trying to get to work on my second Ubuntu computer.
On my main computer (Lubuntu 16.04), Musescore works fine, but on my second computer (also Lubuntu 16.04), it crashes on startup with the message
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
I have tried a few solutions, (including installing every libxcb* package in the repos), but nothing has changed.
As far as I can remember, this worked fine a few weeks ago, still on 16.04.
Any suggestions?
Edit: ldd /usr/bin/musescore
doesn't give any missing liraries: pastebin.
ldd /usr/bin/musescore | grep xcb
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb1487000)
libxcb-dri3.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri3.so.0 (0xaf986000)
libxcb-present.so.0 => /usr/lib/i386-linux-gnu/libxcb-present.so.0 (0xaf982000)
libxcb-sync.so.1 => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 (0xaf979000)
libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xaf936000)
libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xaf91b000)
libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xaf915000)
Edit 2: this is also happening with Notepadqq, with the same error
Using terminal, go to the folder where the application is installed and type:
This should present you with a list of all the required libraries for the application and their location or "not found" if they were not found.
If any are displayed as not found, installing them should solve your problem. It's likely you at least have libqxcb missing.
More information on dependencies for Qt applications on Linux can be found here
The problem was that
libqxcb.so
was there, but its dependencies were not met, namely,libxcb-image.so.0
was marked "not found" in the output ofldd /usr/lib/i386-linux-gnu/qt5/plugins/platforms/libqxcb.so
Reinstalling the
libxcb-image0
package withsudo apt install --reinstall libxcb-image0
fixed the problem!