Important: Please read the Qt Code of Conduct -

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 '' in the distribution let alone in the resulting build. I can find e.g. 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?


  • @CerpherJoe
    Surprising you say "I can't even find '' 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 to 1 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 Running the 'su' command without the dash will invoke the X11 server.

    A slight mystery remains for me. Apparently Qt can find '' even though I can't find it in the distro, See:

    root@whiterose1:~/qt-everywhere-src-6.2.0# find . -name
    root@whiterose1:~/qt-everywhere-src-6.2.0# find . -name
    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
    -rwxr-xr-x 1 root root  53256 Oct  8 13:55
    -rwxr-xr-x 1 root root 114896 Oct  8 13:55
    -rwxr-xr-x 1 root root 191112 Oct  8 13:56
    -rwxr-xr-x 1 root root  25408 Oct  8 16:52

    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.

Log in to reply