Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreator 5.14xcbnot loading xcberror
8 Posts 3 Posters 12.8k 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.
  • S Offline
    S Offline
    Siddhartha V
    wrote on last edited by Siddhartha V
    #1

    Hello,

    I have installed the new QT 5.14.2 instance on my Ubuntu-16.04. I am newbee to the QT and this is the first time I am using the QT. After loading my project when I try to run I am getting the below error.

    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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    
    Press <RETURN> to close this window...
    

    I searched a lot on this and tried all suggested solutions.

    1. I tried installing "sudo apt install libxcb-xinerama0"
    2. I installed "sudo apt-get install libx11-xcb1
    3. tried below:

    $: export QT_DEBUG_PLUGINS=1
    $: ./qtcreator

    then got below error:

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/home/siddhu/Documents/Code_6.0/integration/build-Tester-Desktop_Qt_5_14_2_GCC_64bit/platforms" ...
    Cannot load library /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/sidddu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so))
    QLibraryPrivate::loadPlugin failed on "/home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so))"
    

    Nothing is working for me can anybody help me on this please. I have already wasted 1 full day on debugging this. Kind request.

    regards,
    Siddhartha V

    VRoninV 1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Hi,
      Try running this:

      sudo apt-get update -y
      sudo apt-get install libxcb-icccm4 libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-xinerama0
      

      Hopefully these are all the dependencies required

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      4
      • S Offline
        S Offline
        Siddhartha V
        wrote on last edited by
        #3

        @VRonin said in How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error:

        sudo apt-get install libxcb-icccm4 libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-xinerama0

        hi @VRonin ,

        thank you for the reply. I tried installing them but it shows they are all already present:

        d84d95f7-3529-4140-aebb-a3f84fb697de-image.png

        regards,
        Siddhartha V

        1 Reply Last reply
        0
        • S Siddhartha V

          Hello,

          I have installed the new QT 5.14.2 instance on my Ubuntu-16.04. I am newbee to the QT and this is the first time I am using the QT. After loading my project when I try to run I am getting the below error.

          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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
          
          Press <RETURN> to close this window...
          

          I searched a lot on this and tried all suggested solutions.

          1. I tried installing "sudo apt install libxcb-xinerama0"
          2. I installed "sudo apt-get install libx11-xcb1
          3. tried below:

          $: export QT_DEBUG_PLUGINS=1
          $: ./qtcreator

          then got below error:

          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/siddhu/Documents/Code_6.0/integration/build-Tester-Desktop_Qt_5_14_2_GCC_64bit/platforms" ...
          Cannot load library /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/sidddu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so))
          QLibraryPrivate::loadPlugin failed on "/home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so))"
          

          Nothing is working for me can anybody help me on this please. I have already wasted 1 full day on debugging this. Kind request.

          regards,
          Siddhartha V

          VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4

          @Siddhartha-V said in How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error:

          After loading my project

          Instead of your project, can you loan an example project and see if that works?

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Siddhartha V
            wrote on last edited by
            #5

            Hi @VRonin ,

            Yes, I tried examples that are available inside the QT install directory. They are working.

            I tried two example projects 1. bluetooth and 2. demos.

            8f74ad1f-0011-4f72-b2f7-219191e5dbbd-image.png

            Both worked without any error.

            regards,
            Siddhartha V

            1 Reply Last reply
            0
            • VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              So the problem is with your project.

              @Siddhartha-V said in How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error:

              `Qt_5_PRIVATE_API' not found

              I think your project needs the private API of Qt, you can get them with maintenance tool or apt-get but you should first understand what your project needs

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Siddhartha V
                wrote on last edited by
                #7

                oh ok thank you. Will update if I get any progress.

                1 Reply Last reply
                0
                • Q Offline
                  Q Offline
                  qtcsp
                  wrote on last edited by
                  #8

                  Hi Siddhartha,
                  I am facing a similar issue, have you figured this out? If yes, then could you please help, thanks in advance.

                  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