This application failed to start because it could not find or load the Qt Platform plugin "xcb"
-
Hi, i have found this error below and I'm interested to find out what could be the quick fix for this problem.
I have installed Qt5 on the RPi4 and i compiled the given source code for RPi3. the compilation looks good and no error found.
however after i copied the file and try to run on the RPi3, then it showed me error below:
This application failed to start because it could not find or load the Qt platform plugin "xcb" in "". Available platform plugins are: eglfs, linuxcfb, minimal, minimalegl, offscreen, vnc, webgl, xcb. Reinstalling the application may fix this problem Aborted
i have tried to reinstall couple of times but it still not working.
any idea for quick fixing this issue?
-
@edwardy84 Don't use sudo!
Did you set executable bit on your app for the user?chmod u+x mvc-ui
-
@edwardy84
Further to @jsulm, your screenshot showed you first typed in./ mvc-ui >>> bash ./ Is a directory
That was not a good idea :) You need to type
./mvc-ui
before you go any further!Plain
mvc-ui
won't work if your RPi is like e.g. Ubuntu (I don't know), as.
is not on yourpath
. Hence./mvc-ui
, which will run.If probs, please show
ls -l mvc-ui
, I don't know what "white on pink background" signifies! -
@edwardy84 said in This application failed to start because it could not find or load the Qt Platform plugin "xcb":
Qt platform plugin "xcb" in "".
Do you have X11 installed and running in your RPi 4 device?
The way your starting your Qt app, with no "-platform" parameter to specify any platform plugin, is defaulting to xcb and thus requires X11 running.
You may want to try with other plugin, for instance the following call will start your app in full screen mode:
./mvc-ui -platform linuxfb
-
@edwardy84 First: why is the user of your executable set to "root"?!
Change it to your normal user (I assume your user is "pi" if not change the command bellow):sudo chown pi mvc-ui
Second: setuid bit is set, change that:
chmod u-s mvc-ui
Starting GUI applications with sudo/root can be tricky and usually not needed and dangerous.