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.

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 880.5k Views
  • 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.
  • H hskoglund
    24 Aug 2020, 09:18

    Hmm, if that /usr/bin/qmake is still around, you should get rid of it (I think it's qtchooser):

    sudo apt remove qtchooser
    

    Then to point the linphone-desktop package to where your 5.12.9 is, on their github page it says, set these exports:
    Qt5_DIR="~/Qt/5.12.9/gcc_64/lib/cmake"
    PATH="~/Qt/5.12.9/gcc_64/bin/:$PATH"

    S Offline
    S Offline
    singhravi
    wrote on 24 Aug 2020, 09:22 last edited by
    #47

    @hskoglund
    The env variables, Qt5_DIR and PATH are set with what you suggested.
    I think qmake is required that is why i must have installed it.
    I've ran the build again. Lets see.

    H 1 Reply Last reply 24 Aug 2020, 09:27
    0
    • H Offline
      H Offline
      hskoglund
      wrote on 24 Aug 2020, 09:24 last edited by
      #48

      BTW, found another option: if you can upgrade your Ubuntu 18.04 to 20.04 then you're in luck: the Qt version installed by apt on Ubuntu 20.04 is 5.12.8 :-)

      1 Reply Last reply
      1
      • S singhravi
        24 Aug 2020, 09:22

        @hskoglund
        The env variables, Qt5_DIR and PATH are set with what you suggested.
        I think qmake is required that is why i must have installed it.
        I've ran the build again. Lets see.

        H Offline
        H Offline
        hskoglund
        wrote on 24 Aug 2020, 09:27 last edited by
        #49

        @singhravi Your Qt 5.12.9 has the qmake program in ~/Qt/5.12.9/gcc_64/bin/ so that PATH export setting should point the script to the correct qmake.

        S 1 Reply Last reply 24 Aug 2020, 09:35
        3
        • H hskoglund
          24 Aug 2020, 09:27

          @singhravi Your Qt 5.12.9 has the qmake program in ~/Qt/5.12.9/gcc_64/bin/ so that PATH export setting should point the script to the correct qmake.

          S Offline
          S Offline
          singhravi
          wrote on 24 Aug 2020, 09:35 last edited by
          #50

          @hskoglund I believe we've found the solution to this.
          The problem was ~ (tlide) was not working with .zshrc config.
          Hence qmake and other binary were not being found.
          I've changed it to the absolute path now.
          Running the build again. Lets see :)

          1 Reply Last reply
          1
          • S Offline
            S Offline
            singhravi
            wrote on 24 Aug 2020, 09:49 last edited by
            #51

            It Worked! :facepalm: :D
            Thanks a lot @hskoglund for helping me troubleshoot this! You're great.
            So the problem was a ~ from the beginning. This was too silly.
            Build is sucsessful and Package is running fine now.

            1 Reply Last reply
            2
            • H Offline
              H Offline
              hskoglund
              wrote on 24 Aug 2020, 10:03 last edited by
              #52

              Hah, so it was a ~ that sent you on a wild goose chase!
              (tildes can be a PITA, I remember tripping on them when trying to ssh into Ubuntu from Windows)
              Anways, glad to hear its working now :-)

              1 Reply Last reply
              2
              • H hskoglund
                24 Aug 2020, 09:01

                If those other programs are installed using apt, then apt should warn you if you issue a sudo apt remove libqt5gui5, then other programs are dependent on it (I think so). But I suggest yoy go for it and try the AppImage. Later, if the VLC player malfunctions, you can always do:
                sudo apt install libqt5gui5

                Also, about the Qt version installed by the online installer: it resides 100% in your $HOME directory, it does not touch anything in /usr/lib/x86_64-linux-gnu, nor does it need any Qt files to be installed in /usr/lib/x86_64-linux-gnu.

                Only disadvantage is that, since apt is unaware of it, you have to keep it updated yourself (but Qt Creator has a nice plugin that periodically checks that for you).

                J Offline
                J Offline
                Jalpesh
                wrote on 31 Aug 2020, 19:08 last edited by
                #53

                @hskoglund thank Man!

                sudo apt remove qtchooser
                sudo apt install libqt5gui5

                boom.... its work

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  chEguy
                  wrote on 7 Sept 2020, 16:04 last edited by chEguy 9 Jul 2020, 16:11
                  #54

                  Guys I still am getting this error

                  qt.qpa.xcb: could not connect to display :0
                  qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                  This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                  Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
                  Aborted

                  BTW I am using Ubuntu20 on Windows10 with xcvsrv as X server

                  C 1 Reply Last reply 7 Sept 2020, 16:15
                  0
                  • C chEguy
                    7 Sept 2020, 16:04

                    Guys I still am getting this error

                    qt.qpa.xcb: could not connect to display :0
                    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
                    Aborted

                    BTW I am using Ubuntu20 on Windows10 with xcvsrv as X server

                    C Offline
                    C Offline
                    chEguy
                    wrote on 7 Sept 2020, 16:15 last edited by
                    #55

                    I actually am not able to connect it to the display

                    Please help

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hskoglund
                      wrote on 7 Sept 2020, 18:26 last edited by
                      #56

                      Hi just guessing but maybe the solution in this post will help you too.

                      1 Reply Last reply
                      1
                      • L Lengendary
                        6 Aug 2020, 18:12

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

                        M Offline
                        M Offline
                        Matriarch
                        wrote on 8 Sept 2020, 10:07 last edited by
                        #57

                        @Lengendary This is working solution for me, thank you

                        sudo apt-get install libxcb-xinerama0

                        V 1 Reply Last reply 17 Jul 2021, 11:48
                        3
                        • A Offline
                          A Offline
                          aurelien
                          wrote on 12 Sept 2020, 07:31 last edited by
                          #58

                          I know it is considered as a good software to build good software, but the point is here:

                          When you follow an installation guide step by step and make everything correctly, and the stuff does not works, that just mean it have been made with foot (from the stuff to the documentation.)

                          Really for thus who do their best, but it just not works on Debian 10 without doing weird things that should not be done out of the installation documentation.

                          Good luck

                          1 Reply Last reply
                          0
                          • S Srinivas Reddy
                            8 Jun 2020, 05:40

                            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

                            O Offline
                            O Offline
                            Obed
                            wrote on 15 Sept 2020, 11:49 last edited by
                            #59

                            @Srinivas-Reddy Thanks. That helped me

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              Megan S
                              wrote on 21 Sept 2020, 23:46 last edited by
                              #60

                              Thanks for all the helpful info on the thread!!

                              I am attempting an anaconda environment creation... I don't have admin privileges on the system I'm working on. It's Ubuntu16.04.1 LTS (Xenial Xerus)"

                              The error I get is below. I'm assuming that because I'm using the anaconda install vs using apt-get, I can't just easily reinstall? It looks to me as if I'm missing the libxcb-xinerama.so.0 package. I checked qmake --version, the output shows Qt version 5.9.7

                              Thanks for any suggestions!

                              QLibraryPrivate::loadPlugin failed on "/export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
                              qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                              This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

                              $ qmake --version
                              QMake version 3.1
                              Using Qt version 5.9.7 in /export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib

                              jsulmJ 1 Reply Last reply 22 Sept 2020, 06:45
                              0
                              • M Megan S
                                21 Sept 2020, 23:46

                                Thanks for all the helpful info on the thread!!

                                I am attempting an anaconda environment creation... I don't have admin privileges on the system I'm working on. It's Ubuntu16.04.1 LTS (Xenial Xerus)"

                                The error I get is below. I'm assuming that because I'm using the anaconda install vs using apt-get, I can't just easily reinstall? It looks to me as if I'm missing the libxcb-xinerama.so.0 package. I checked qmake --version, the output shows Qt version 5.9.7

                                Thanks for any suggestions!

                                QLibraryPrivate::loadPlugin failed on "/export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
                                qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                                This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

                                $ qmake --version
                                QMake version 3.1
                                Using Qt version 5.9.7 in /export/research/analysis/human/jstephen/shared/programs/python/anaconda_072020/new/envs/mne21/lib

                                jsulmJ Online
                                jsulmJ Online
                                jsulm
                                Lifetime Qt Champion
                                wrote on 22 Sept 2020, 06:45 last edited by
                                #61

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

                                libxcb-xinerama.so.0: cannot open shared object file: No such file or directory

                                So do you have libxcb-xinerama.so.0?

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                2
                                • S Srinivas Reddy
                                  8 Jun 2020, 05:40

                                  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

                                  M Offline
                                  M Offline
                                  mathsbloke
                                  wrote on 17 Oct 2020, 17:46 last edited by
                                  #62

                                  @Srinivas-Reddy Many thanks, that got mine working too!

                                  1 Reply Last reply
                                  0
                                  • S Srinivas Reddy
                                    8 Jun 2020, 05:40

                                    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

                                    C Offline
                                    C Offline
                                    C0K01
                                    wrote on 5 Nov 2020, 17:52 last edited by
                                    #63

                                    @Srinivas-Reddy Many thanks!

                                    1 Reply Last reply
                                    0
                                    • A Advig
                                      4 Jul 2020, 17:41

                                      Tried reinstalling libxcb and worked for me as well.

                                      J Offline
                                      J Offline
                                      Jimit Rupani
                                      wrote on 18 Nov 2020, 12:20 last edited by
                                      #64

                                      @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 1 Reply Last reply 28 Dec 2020, 17:14
                                      2
                                      • coffeesmokeC Offline
                                        coffeesmokeC Offline
                                        coffeesmoke
                                        wrote on 23 Nov 2020, 07:46 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 29 Nov 2020, 10:03
                                        8
                                        • S Offline
                                          S Offline
                                          stounhange7
                                          wrote on 23 Nov 2020, 18:11 last edited by
                                          #66

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

                                          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