Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt.qpa.plugin: could not find the Qt platform plugin "xcb" in ""
QtWS25 Last Chance

qt.qpa.plugin: could not find the Qt platform plugin "xcb" in ""

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 3 Posters 23.1k 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.
  • I IknowQT

    @JonB

    Should the libqxcb.so file be in the path you said? As you said I don't have that file.

    Now that I know the cause, is there a way to fix it?

    JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by
    #5

    @IknowQT said in qt.qpa.plugin: could not find the Qt platform plugin "xcb" in "":

    Should the libqxcb.so file be in the path you said? As you said I don't have that file.

    I believe so. Look at the other paths in the diagnostic output.

    Now that I know the cause, is there a way to fix it?

    Somehow by installing that file, plus any dependencies. Not my area, someone else may know. But how/what did you do to install these library files on your RPi? Did you look through some of the Google hits to see if any apply to your case?

    I 1 Reply Last reply
    0
    • JonBJ JonB

      @IknowQT said in qt.qpa.plugin: could not find the Qt platform plugin "xcb" in "":

      Should the libqxcb.so file be in the path you said? As you said I don't have that file.

      I believe so. Look at the other paths in the diagnostic output.

      Now that I know the cause, is there a way to fix it?

      Somehow by installing that file, plus any dependencies. Not my area, someone else may know. But how/what did you do to install these library files on your RPi? Did you look through some of the Google hits to see if any apply to your case?

      I Offline
      I Offline
      IknowQT
      wrote on last edited by
      #6

      @JonB

      I was looking. Most recommended apt install libxcb-xinerama, but I am already up to date and the result is the same

      JonBJ 1 Reply Last reply
      0
      • I IknowQT

        @JonB

        I was looking. Most recommended apt install libxcb-xinerama, but I am already up to date and the result is the same

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #7

        @IknowQT
        I think that is the other way round: I believe libxcb-xinerama is a library needed for the xcb library, and you have not got that far. Don't you need something like

        apt install libxcb
        # or
        apt install libqxcb
        

        Press the Tab key (possibly twice) at the end of these lines and the shell should show you names of whatever packages match the prefixes.

        I 1 Reply Last reply
        0
        • JonBJ JonB

          @IknowQT
          I think that is the other way round: I believe libxcb-xinerama is a library needed for the xcb library, and you have not got that far. Don't you need something like

          apt install libxcb
          # or
          apt install libqxcb
          

          Press the Tab key (possibly twice) at the end of these lines and the shell should show you names of whatever packages match the prefixes.

          I Offline
          I Offline
          IknowQT
          wrote on last edited by
          #8

          @JonB
          It says the package you said could not be found.

          JonBJ 1 Reply Last reply
          0
          • I IknowQT

            @JonB
            It says the package you said could not be found.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #9

            @IknowQT
            Are you compiling and deploying all on RPi, or are you cross-compiling for RPi from another host?
            What about trying

            find / -name libqxcb.so -ls 2>/dev/null
            

            on your RPi, and also on host platform if you are cross-compiling?

            What about perhaps https://forum.qt.io/topic/125582/qt-5-15-2-do-not-build-libqxcb-so-but-at-the-same-time-qt-5-14-0-successfully-build-libqxcb-so :

            Seems like I fix the problem:

            sudo apt-get install libxcb-util-dev

            It required for build Qt 5.15.x but not required for Qt 5.14.x

            ?

            I 1 Reply Last reply
            0
            • JonBJ JonB

              @IknowQT
              Are you compiling and deploying all on RPi, or are you cross-compiling for RPi from another host?
              What about trying

              find / -name libqxcb.so -ls 2>/dev/null
              

              on your RPi, and also on host platform if you are cross-compiling?

              What about perhaps https://forum.qt.io/topic/125582/qt-5-15-2-do-not-build-libqxcb-so-but-at-the-same-time-qt-5-14-0-successfully-build-libqxcb-so :

              Seems like I fix the problem:

              sudo apt-get install libxcb-util-dev

              It required for build Qt 5.15.x but not required for Qt 5.14.x

              ?

              I Offline
              I Offline
              IknowQT
              wrote on last edited by
              #10

              @JonB

              I have built a cross-compilation environment in Ubuntu and am running it by uploading it to Raspberry Pi.

              find / -name libqxcb.so -ls 2>/dev/null

              Here is the result I tried.

              devqt@devqt-desktop:/$ find / -name libqxcb.so -ls 2>/dev/null
               29906776     12 -rwxrwxrwx   1 root     root         9680  9월 28  2020 /root/rpi-qt_32/sysroot/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so
               29127237     12 -rwxrwxrwx   1 root     root         9680  9월 28  2020 /root/rpi-qt_32/sysroot/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so
              

              sudo apt-get install libxcb-util-dev
              It says package not found.
              instead

              sudo apt-get install libxcb-util0-dev
              sudo apt-get install libxcb-util0

              There are two packages, so I installed both, but it says that they are already installed.

              JonBJ 1 Reply Last reply
              0
              • I IknowQT

                @JonB

                I have built a cross-compilation environment in Ubuntu and am running it by uploading it to Raspberry Pi.

                find / -name libqxcb.so -ls 2>/dev/null

                Here is the result I tried.

                devqt@devqt-desktop:/$ find / -name libqxcb.so -ls 2>/dev/null
                 29906776     12 -rwxrwxrwx   1 root     root         9680  9월 28  2020 /root/rpi-qt_32/sysroot/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so
                 29127237     12 -rwxrwxrwx   1 root     root         9680  9월 28  2020 /root/rpi-qt_32/sysroot/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so
                

                sudo apt-get install libxcb-util-dev
                It says package not found.
                instead

                sudo apt-get install libxcb-util0-dev
                sudo apt-get install libxcb-util0

                There are two packages, so I installed both, but it says that they are already installed.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #11

                @IknowQT
                These look possibly like the required files. Since I know nothing about RPi or cross-compiling for it, I do not know whether these are situated on the cross-compiling machine or on the RPI target. I would guess the compiling machine, but don't know.

                • If they are on the compiling machine don't they need copying to the RPi?
                • If they are on the RPi then where are they, aren't they supposed to be in /usr/local/qt5.15/plugins/platforms or somewhere Qt plugins are sought?

                I know nothing about "after depoly from qtcreator to Raspberry Pi", check whatever instructions you are using?

                Earlier:

                sudo apt-get install libxcb-util0-dev
                sudo apt-get install libxcb-util0

                and you said "It says the package you said could not be found."

                If these worked did you really follow my instruction:

                apt install libxcb
                # or
                apt install libqxcb
                

                Press the Tab key (possibly twice) at the end of these lines and the shell should show you names of whatever packages match the prefixes

                or did you just ignore what I said about the Tab key?

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  IknowQT
                  wrote on last edited by
                  #12
                  /lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so
                  

                  The Raspberry Pi also has this file.
                  it's too hard

                  JonBJ 1 Reply Last reply
                  0
                  • I IknowQT
                    /lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so
                    

                    The Raspberry Pi also has this file.
                    it's too hard

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #13

                    @IknowQT said in qt.qpa.plugin: could not find the Qt platform plugin "xcb" in "":

                    it's too hard

                    Best of luck.

                    S 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @IknowQT said in qt.qpa.plugin: could not find the Qt platform plugin "xcb" in "":

                      it's too hard

                      Best of luck.

                      S Offline
                      S Offline
                      SiGa
                      wrote on last edited by
                      #14

                      I had the same or similar issue.
                      libqxcb was not present in (install_dir is the path provided with -prefix during configuration)

                      install_dir/plugins/platforms
                      

                      I had to install the recommended packages from https://doc.qt.io/qt-6/linux-requirements.html and then rebuild qt from source(configure, compile, install, copy to target).
                      Additionally my copy command did not copy libqxcb, so I used compressed version for copying.
                      In the end I was missing some libs on the target, machine. After this, it worked.
                      May it be helpful for some future visitor.

                      1 Reply Last reply
                      0
                      • SGaistS SGaist has marked this topic as solved on

                      • Login

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