Unsolved Could not find "xcb" - Redux
-
Some recent Ubuntu updates seem to have put a hurting on Qt. The problem showed up to me with my Bitcoin node (which uses Qt) failing to load because "Could not load the Qt platform plugin "xcb" in "" even though it was found"
I have read the responses to other similar questions and I wound up reinstalling Qt (v Qt6). I still have the same problem.
But perhaps more confusing to me is I can't even find 'libqxcb.so' in the distribution let alone in the resulting build. I can find e.g. libqvnc.so in the distribution and the resulting build, so I'm a little lost.
I notice in config.summary, that 'Features used by QPA backends:' ; 'X11 Specific' ; 'XCB Xlib' is set to 'no'.
Note: I built without Open GL (-no-enable-GL)
Did I choose the wrong distribution to download? Any other thoughts?
Thanks.
-
@CerpherJoe
Surprising you say "I can't even find 'libqxcb.so' in the distribution" when the error message is "even though it was found".If you read responses to the many times this question has been asked, the very first thing you would do is run your application with environment variable
QT_DEBUG_PLUGINS
set to1
and examine/show the diagnostic output? -
Turns out the source of my problem was the Ubuntu shell and not Qt proper. The behaviour of the 'su -' command has changed. I'm guessing increased security. Using that command will now invoke a superuser shell but without the X11 server. Without X11, Qt can't load libxcb.so. Running the 'su' command without the dash will invoke the X11 server.
A slight mystery remains for me. Apparently Qt can find 'libqxcb.so' even though I can't find it in the distro, See:
root@whiterose1:~/qt-everywhere-src-6.2.0# find . -name libqxcb.so root@whiterose1:~/qt-everywhere-src-6.2.0# find . -name libqvnc.so ./qtbase/plugins/platforms/libqvnc.so root@whiterose1:~/qt-everywhere-src-6.2.0# ls -l qtbase/plugins/platforms/ total 728 -rwxr-xr-x 1 root root 345976 Oct 8 13:55 libqlinuxfb.so -rwxr-xr-x 1 root root 53256 Oct 8 13:55 libqminimal.so -rwxr-xr-x 1 root root 114896 Oct 8 13:55 libqoffscreen.so -rwxr-xr-x 1 root root 191112 Oct 8 13:56 libqvnc.so -rwxr-xr-x 1 root root 25408 Oct 8 16:52 libqwayland-generic.so root@whiterose1:~/qt-everywhere-src-6.2.0#
Thanks for your help.
-
it is likely you are using wayland, not X11
Switch from Wayland to Xorg in Ubuntu
At the login screen click on the cog icon beside the “Sign In” button. Select the option “Ubuntu on Xorg.” Enter your password and log in to your Ubuntu machine.