Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Forum Updated to NodeBB v4.3 + New Features

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

Scheduled Pinned Locked Moved Solved Installation and Deployment
183 Posts 87 Posters 909.1k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • coffeesmokeC Offline
    coffeesmokeC Offline
    coffeesmoke
    wrote on last edited by
    #65

    So, Debian 10:

    1. ldd -r <for example, home dir>/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep libxcb-util

    libxcb-util.so.1 => not found

    1. Ok, continue...
      sudo find /usr/lib | grep libxcb-util
      ...
      libxcb-util.so.0.0.0
      libxcb-util.so.0.0
      libxcb-util.so.0
      , but need
      libxcb-util.so.1

    2. Ok, Debian... :) Redy?
      sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0.0
      sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0
      sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

    QtCreator start complete! :))))

    1 B N R 4 Replies Last reply
    8
    • S Offline
      S Offline
      stounhange7
      wrote on last edited by
      #66

      @coffeesmoke thanks for the help. you revived my qt on debian 10

      1 Reply Last reply
      0
      • coffeesmokeC coffeesmoke

        So, Debian 10:

        1. ldd -r <for example, home dir>/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep libxcb-util

        libxcb-util.so.1 => not found

        1. Ok, continue...
          sudo find /usr/lib | grep libxcb-util
          ...
          libxcb-util.so.0.0.0
          libxcb-util.so.0.0
          libxcb-util.so.0
          , but need
          libxcb-util.so.1

        2. Ok, Debian... :) Redy?
          sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0.0
          sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0
          sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

        QtCreator start complete! :))))

        1 Offline
        1 Offline
        1init
        wrote on last edited by 1init
        #67

        @coffeesmoke thank you for this i ran the debian 9 instructions after installing the updates and had this issue
        i run devuan

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Malachi
          wrote on last edited by Malachi
          #68

          That symlink seems a little risky. Two worries:

          • What happens when the actual v1+ of the actual libxcb-util attempts to install?
          • Are you 100% sure Qt Creator isn't depending on a different API? Seems like a dice roll

          I admit though, it's better than nothing

          EDIT: A few minutes of browsing https://gitlab.freedesktop.org/xorg/lib/libxcb-util/-/blob/master/NEWS suggests that no API changes are there and that symlinking is probably API compliant in this case. Funny that Debian is 6 years behind on this lib. No judging. I know they gotta test stuff. Just funny :)

          S 1 Reply Last reply
          0
          • M Malachi

            That symlink seems a little risky. Two worries:

            • What happens when the actual v1+ of the actual libxcb-util attempts to install?
            • Are you 100% sure Qt Creator isn't depending on a different API? Seems like a dice roll

            I admit though, it's better than nothing

            EDIT: A few minutes of browsing https://gitlab.freedesktop.org/xorg/lib/libxcb-util/-/blob/master/NEWS suggests that no API changes are there and that symlinking is probably API compliant in this case. Funny that Debian is 6 years behind on this lib. No judging. I know they gotta test stuff. Just funny :)

            S Offline
            S Offline
            SlySven
            wrote on last edited by
            #69

            Assuming that version 0 of something is a pre-first version release and that Devuan 3.0 "Beowulf" (systemd-less fork of Debian 10.0 "Buster") only has the 0.0.0 version then I guess symlinking the 0.0.0 to the 1.0.0 is the only chance we've got. I just got clobbered by this when running the Qt Creator updater from within the last version that was giving me Qt 5.15.1 that told me that there was an update available. It is a real PITA when it upgraded itself out of working...

            ... however this topic has worked for me.

            BTW The Devuan libxcb-util 0.0.0 version libraries do date back to 20 Aug 2014!

            1 Reply Last reply
            0
            • coffeesmokeC coffeesmoke

              So, Debian 10:

              1. ldd -r <for example, home dir>/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep libxcb-util

              libxcb-util.so.1 => not found

              1. Ok, continue...
                sudo find /usr/lib | grep libxcb-util
                ...
                libxcb-util.so.0.0.0
                libxcb-util.so.0.0
                libxcb-util.so.0
                , but need
                libxcb-util.so.1

              2. Ok, Debian... :) Redy?
                sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0.0
                sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0
                sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

              QtCreator start complete! :))))

              B Offline
              B Offline
              beetree
              wrote on last edited by
              #70

              @coffeesmoke

              As for Debian. The correct library is found as of Debian 11. Which at the moment is in testing.

              • Qt application fails to start on Debian 10 Buster because libqxcb.so requires missing libxcb-util.so.1

              Symlink to a different library version is a possible workaround, but does not guarantee everything else works as expected, and as such ill advised.

              coffeesmokeC 1 Reply Last reply
              0
              • S Offline
                S Offline
                saulesquivelg
                wrote on last edited by
                #71

                I had the same problem after installing QT in Ubuntu 18.04, I've solved it with sudo apt install libxcp-xinerama0

                1 Reply Last reply
                0
                • B beetree

                  @coffeesmoke

                  As for Debian. The correct library is found as of Debian 11. Which at the moment is in testing.

                  • Qt application fails to start on Debian 10 Buster because libqxcb.so requires missing libxcb-util.so.1

                  Symlink to a different library version is a possible workaround, but does not guarantee everything else works as expected, and as such ill advised.

                  coffeesmokeC Offline
                  coffeesmokeC Offline
                  coffeesmoke
                  wrote on last edited by
                  #72

                  @beetree I agree. Alternatively , a virtual machine. But if you do not want to install the VM, you need to save the changes in the notations to yourself to be able to return to the original version.

                  1 Reply Last reply
                  0
                  • J Jimit Rupani

                    @Advig said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                    1. export QT_DEBUG_PLUGINS=1

                    2. export PATH=$PATH:~/Qt/Tools/QtCreator/bin

                    3. libxcb dependency so https://unix.stackexchange.com/questions/338519/how-to-install-libxcb gave the solution.

                    sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev

                    1. sudo apt-get install libxkbcommon-x11-dev

                    solved my problem for ubuntu 20.04. Tried reinstalling almost 3 times before the solution. Hope it helps someone

                    A Offline
                    A Offline
                    Alexreell
                    wrote on last edited by
                    #73

                    @Jimit-Rupani Thank you, the first 2 points on kali linux helped me

                    1 Reply Last reply
                    0
                    • coffeesmokeC coffeesmoke

                      So, Debian 10:

                      1. ldd -r <for example, home dir>/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep libxcb-util

                      libxcb-util.so.1 => not found

                      1. Ok, continue...
                        sudo find /usr/lib | grep libxcb-util
                        ...
                        libxcb-util.so.0.0.0
                        libxcb-util.so.0.0
                        libxcb-util.so.0
                        , but need
                        libxcb-util.so.1

                      2. Ok, Debian... :) Redy?
                        sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0.0
                        sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0
                        sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

                      QtCreator start complete! :))))

                      N Offline
                      N Offline
                      Niffo
                      wrote on last edited by
                      #74

                      @coffeesmoke Thank you VERY much !

                      1 Reply Last reply
                      0
                      • S Srinivas Reddy

                        I am using Qt-5.15.0, got the same problem.
                        More details are:
                        QLibraryPrivate::loadPlugin failed on "/opt/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"

                        Solved by installing the dependent package.
                        Command to install: sudo apt-get install libxcb-xinerama0

                        S Offline
                        S Offline
                        sheril
                        wrote on last edited by
                        #75

                        @Srinivas-Reddy
                        Thanks.

                        1 Reply Last reply
                        0
                        • L Lengendary

                          Thanks very much!
                          I spent several hours trying to solve this problem until I got here.
                          sudo apt-get install libxcb-xinerama0
                          Thanks!

                          R Offline
                          R Offline
                          requinham
                          wrote on last edited by
                          #76

                          @Lengendary Thanks, this resolve the problem for me on Ubuntu 18.04 Qt 5.15.2

                          Regards,
                          Mohamed Hamzaoui

                          C 1 Reply Last reply
                          0
                          • R requinham

                            @Lengendary Thanks, this resolve the problem for me on Ubuntu 18.04 Qt 5.15.2

                            C Offline
                            C Offline
                            CoreDump
                            wrote on last edited by
                            #77

                            Environment: Ubuntu20.10; Qt 5.15.2, VirtualBox VM:

                            The solution provided by @Legendary no longer works, use this instead:

                            $ sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev

                            1 Reply Last reply
                            0
                            • coffeesmokeC coffeesmoke

                              So, Debian 10:

                              1. ldd -r <for example, home dir>/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep libxcb-util

                              libxcb-util.so.1 => not found

                              1. Ok, continue...
                                sudo find /usr/lib | grep libxcb-util
                                ...
                                libxcb-util.so.0.0.0
                                libxcb-util.so.0.0
                                libxcb-util.so.0
                                , but need
                                libxcb-util.so.1

                              2. Ok, Debian... :) Redy?
                                sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0.0
                                sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1.0
                                sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

                              QtCreator start complete! :))))

                              R Offline
                              R Offline
                              roboTURx
                              wrote on last edited by
                              #78

                              @coffeesmoke thanks a lot ~ this works for me

                              1 Reply Last reply
                              0
                              • L Lengendary

                                Thanks very much!
                                I spent several hours trying to solve this problem until I got here.
                                sudo apt-get install libxcb-xinerama0
                                Thanks!

                                D Offline
                                D Offline
                                Deep61803
                                wrote on last edited by
                                #79

                                @Lengendary said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                                ibxcb-xinerama0

                                Thank you, This solution helped me also.

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  trimixotun
                                  wrote on last edited by trimixotun
                                  #80

                                  It's looks slightly outdated, but maybe it someone helps:

                                  1. Debian 10 x86-64.
                                  2. LXDE
                                  3. Fresh net install Qt 5.12.10

                                  Qtcreator first launch problem: "qt.qpa.plugin: Could not load the Qt platform plugin "xcb"".

                                  Nothing from above helps at all. Qtcreator needs libxcb-util.so.1, but system has only libxcb-util.so.

                                  Simple solution:

                                  sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

                                  All work, folks.

                                  W G 2 Replies Last reply
                                  1
                                  • T trimixotun

                                    It's looks slightly outdated, but maybe it someone helps:

                                    1. Debian 10 x86-64.
                                    2. LXDE
                                    3. Fresh net install Qt 5.12.10

                                    Qtcreator first launch problem: "qt.qpa.plugin: Could not load the Qt platform plugin "xcb"".

                                    Nothing from above helps at all. Qtcreator needs libxcb-util.so.1, but system has only libxcb-util.so.

                                    Simple solution:

                                    sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

                                    All work, folks.

                                    W Offline
                                    W Offline
                                    wobl
                                    wrote on last edited by wobl
                                    #81

                                    @trimixotun said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                                    sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

                                    Thanks a lot ... this is working for MX Linux too - but with a little correction:

                                    sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1
                                    
                                    1 Reply Last reply
                                    1
                                    • S Srinivas Reddy

                                      I am using Qt-5.15.0, got the same problem.
                                      More details are:
                                      QLibraryPrivate::loadPlugin failed on "/opt/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"

                                      Solved by installing the dependent package.
                                      Command to install: sudo apt-get install libxcb-xinerama0

                                      N Offline
                                      N Offline
                                      nileshmoodley
                                      wrote on last edited by
                                      #82

                                      @Srinivas-Reddy Thank you very much - this solved it for me!

                                      1 Reply Last reply
                                      0
                                      • J Offline
                                        J Offline
                                        Jean-Noel
                                        wrote on last edited by Jean-Noel
                                        #83

                                        For me (on Debian), the only thing that worked was to completely uninstall Qt with Maintenance Tool, and install with "default" configuration.

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          ajlogo
                                          wrote on last edited by
                                          #84

                                          The plugin problem started when I re-created an Anaconda env (PyQt5 and ubuntu) from a .yml file.
                                          https://newini.wordpress.com/2020/08/13/how-to-solve-xcb-plugin-error-in-pyqt5/
                                          Had the working answer for me:
                                          sudo apt-get install qt5-default # For Ubuntu system

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved