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. Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in ""
Forum Updated to NodeBB v4.3 + New Features

Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in ""

Scheduled Pinned Locked Moved Unsolved General and Desktop
17 Posts 7 Posters 4.8k Views 2 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.
  • mrjjM mrjj

    Hi

    And its not missing Dependencies as seen on ubuntu ?

    https://forum.qt.io/topic/116299/qt-creator-ubuntu-20-04

    Also The error "is not an ELF object" seem really strange.

    What platform/Os is this ?

    Nasser AhmedN Offline
    Nasser AhmedN Offline
    Nasser Ahmed
    wrote on last edited by Nasser Ahmed
    #3

    @mrjj
    Sorry I forgot to add it, here it's
    OS: Ubuntu 18.04.5 LTS
    Laptop: DELL LATITUDE E6540
    And I have tried the topic in the link and the solution didn't work for me either

    mrjjM 1 Reply Last reply
    0
    • Nasser AhmedN Nasser Ahmed

      I have downloaded Qt5 and QtCreator source code from the official web site and compiled them using CMake, anyway only QtCreator is installed (No QtDesigner) and I can't even launch it, when I try to launch it I got the following error:

      qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
      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.
      
      Aborted (core dumped)
      
      

      with QT_DEBUG_PLUGINS=1

      Got keys from plugin meta data ("wayland-xcomposite-glx")
      QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a"
      QElfParser: '/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a' is not an ELF object
      "'/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a' is not an ELF object" 
               not a plugin
      QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl"
      QElfParser: '/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl' is not an ELF object
      "'/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl' is not an ELF object" 
               not a plugin
      QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so"
      Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "webgl"
              ]
          },
          "archreq": 1,
          "className": "QWebGLIntegrationPlugin",
          "debug": true,
          "version": 331520
      }
      
      
      Got keys from plugin meta data ("webgl")
      QFactoryLoader::QFactoryLoader() checking directory path "/home/nasser/Programs/Qt5/Qt_Creator/qtcreator_build/bin/platforms" ...
      qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
      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.
      
      Aborted (core dumped)
      
      

      I have searched for this for 3 days and nothing changed, I even re-installed the xorg, note that I although work with OpenGL and GLFW and it works well.

      *Note: The first time I faced the problem was when I try to run an application inside QtCreator(I downloaded it via apt), and it gave me the same message, so I removed it and compiled it from source, now I can't even launch Qt with the same message.

      Thanks in advance.

      EDIT:
      System specification:
      OS: Ubuntu 18.04.5 LTS
      Laptop: DELL LATITUDE E6540

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @Nasser-Ahmed said in Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in "":

      Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl

      XCB plug-in wasn't built. You should check config.log file from your Qt build folder to see why (usually some dependencies are missing).

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

      Nasser AhmedN R 2 Replies Last reply
      1
      • Nasser AhmedN Nasser Ahmed

        @mrjj
        Sorry I forgot to add it, here it's
        OS: Ubuntu 18.04.5 LTS
        Laptop: DELL LATITUDE E6540
        And I have tried the topic in the link and the solution didn't work for me either

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #5

        @Nasser-Ahmed

        Is there any reason you can't just install it via the Qt online installer ?

        I mean versus bulding it yourself .

        Nasser AhmedN 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Hi,

          Beside the points of my fellows, did you build Qt as a static framework ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          Nasser AhmedN 1 Reply Last reply
          0
          • JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #7

            https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @Nasser-Ahmed said in Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in "":

              Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl

              XCB plug-in wasn't built. You should check config.log file from your Qt build folder to see why (usually some dependencies are missing).

              Nasser AhmedN Offline
              Nasser AhmedN Offline
              Nasser Ahmed
              wrote on last edited by Nasser Ahmed
              #8

              @jsulm Sorry for late reply, I took the whole day yesterday compiling it again.
              Yeah thanks a lot for the hint icb_iccm wasn't installed, so I have installed it, and now there is no errors in config.log, but when I rebuild it, it takes 3:30 hours

              make -j 4
              

              and it gave me the following errors, I couldn't catch them all as I build it from the terminal window because it takes too much and the laptop fan is getting too high.
              the errors are:

              ninja: build stopped: subcommand failed
              Makefile.gn_rn:1231: recipe for target 'run_ninja' failed
              
              
              Makefile: 82: recipe for target 'sub-gn_run-pro-make_first' failed
              
              Makefile: 79: recipe for target 'sub-core-make_first' failed
              
              Makefile: 48: recipe for target 'sub-src-make_first' failed
              
              Makefile: 1078: recipe for target 'module-qtwebengine-make_first' failed
              
              make: *** [module-qtwebengine-make_first] Error 2
              
              

              In the last time(before xcb_iccm), it took less time and compiled without errors.

              Edit:

              Configuration command:

              ../qt-everywhere-src-5.15.2/configure -debug -nomake examples -nomake tests
              

              Build command:

              make -j 4
              
              Nasser AhmedN 1 Reply Last reply
              0
              • mrjjM mrjj

                @Nasser-Ahmed

                Is there any reason you can't just install it via the Qt online installer ?

                I mean versus bulding it yourself .

                Nasser AhmedN Offline
                Nasser AhmedN Offline
                Nasser Ahmed
                wrote on last edited by
                #9

                @mrjj Well, building it my self will allow me to customize the version, and I also I use the OpenSource version, I didn't think about online installer as I build every thing myself

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Did you rebuild Qt from a clean state ?
                  Unless you plan to use all modules, I would recommend skipping those that you will not use right now (especially webengine as it is pretty heavy and long to build). This will speed up things and use less space on your hard drive.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  Nasser AhmedN 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Hi,

                    Beside the points of my fellows, did you build Qt as a static framework ?

                    Nasser AhmedN Offline
                    Nasser AhmedN Offline
                    Nasser Ahmed
                    wrote on last edited by
                    #11

                    @SGaist It's a great a idea, but I didn't try it as I will have to manage every thing manually for each application

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Did you rebuild Qt from a clean state ?
                      Unless you plan to use all modules, I would recommend skipping those that you will not use right now (especially webengine as it is pretty heavy and long to build). This will speed up things and use less space on your hard drive.

                      Nasser AhmedN Offline
                      Nasser AhmedN Offline
                      Nasser Ahmed
                      wrote on last edited by
                      #12

                      @SGaist I have skipped QTWebengine and it took only 2 hours, but when I run Qt Creator again it gives me the same error, I also rebooted my laptop

                      1 Reply Last reply
                      0
                      • Nasser AhmedN Nasser Ahmed

                        @jsulm Sorry for late reply, I took the whole day yesterday compiling it again.
                        Yeah thanks a lot for the hint icb_iccm wasn't installed, so I have installed it, and now there is no errors in config.log, but when I rebuild it, it takes 3:30 hours

                        make -j 4
                        

                        and it gave me the following errors, I couldn't catch them all as I build it from the terminal window because it takes too much and the laptop fan is getting too high.
                        the errors are:

                        ninja: build stopped: subcommand failed
                        Makefile.gn_rn:1231: recipe for target 'run_ninja' failed
                        
                        
                        Makefile: 82: recipe for target 'sub-gn_run-pro-make_first' failed
                        
                        Makefile: 79: recipe for target 'sub-core-make_first' failed
                        
                        Makefile: 48: recipe for target 'sub-src-make_first' failed
                        
                        Makefile: 1078: recipe for target 'module-qtwebengine-make_first' failed
                        
                        make: *** [module-qtwebengine-make_first] Error 2
                        
                        

                        In the last time(before xcb_iccm), it took less time and compiled without errors.

                        Edit:

                        Configuration command:

                        ../qt-everywhere-src-5.15.2/configure -debug -nomake examples -nomake tests
                        

                        Build command:

                        make -j 4
                        
                        Nasser AhmedN Offline
                        Nasser AhmedN Offline
                        Nasser Ahmed
                        wrote on last edited by
                        #13

                        @Nasser-Ahmed Okay, I have skipped QtWebEngine and it didn't give me the error in Qt compilation, but when I run the QtCreator it still have the original error

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          Then from the looks of it, you are missing some of the xcb dependencies hence the plugin is not built.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @Nasser-Ahmed said in Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in "":

                            Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl

                            XCB plug-in wasn't built. You should check config.log file from your Qt build folder to see why (usually some dependencies are missing).

                            R Offline
                            R Offline
                            RajeshH
                            wrote on last edited by
                            #15

                            @jsulm Could you please help me , In Ubuntu 20, i installed qtcreator and started X11(Xlanuch), I am getting this error.

                            Got keys from plugin meta data ("vnc")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
                            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
                            {
                            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                            "MetaData": {
                            "Keys": [
                            "xcb"
                            ]
                            },
                            "archreq": 0,
                            "className": "QXcbIntegrationPlugin",
                            "debug": false,
                            "version": 330752
                            }

                            Got keys from plugin meta data ("xcb")
                            QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
                            loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
                            qt.qpa.xcb: could not connect to display 127.0.0.1:86.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

                            Thank you

                            mrjjM eyllanescE 2 Replies Last reply
                            0
                            • R RajeshH

                              @jsulm Could you please help me , In Ubuntu 20, i installed qtcreator and started X11(Xlanuch), I am getting this error.

                              Got keys from plugin meta data ("vnc")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
                              Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
                              {
                              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                              "MetaData": {
                              "Keys": [
                              "xcb"
                              ]
                              },
                              "archreq": 0,
                              "className": "QXcbIntegrationPlugin",
                              "debug": false,
                              "version": 330752
                              }

                              Got keys from plugin meta data ("xcb")
                              QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
                              loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
                              qt.qpa.xcb: could not connect to display 127.0.0.1:86.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

                              Thank you

                              mrjjM Offline
                              mrjjM Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              @RajeshH

                              Hi
                              try
                              sudo apt-get install libxcb-xinerama0
                              might need more.

                              1 Reply Last reply
                              0
                              • R RajeshH

                                @jsulm Could you please help me , In Ubuntu 20, i installed qtcreator and started X11(Xlanuch), I am getting this error.

                                Got keys from plugin meta data ("vnc")
                                QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
                                Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
                                {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                "Keys": [
                                "xcb"
                                ]
                                },
                                "archreq": 0,
                                "className": "QXcbIntegrationPlugin",
                                "debug": false,
                                "version": 330752
                                }

                                Got keys from plugin meta data ("xcb")
                                QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
                                loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
                                qt.qpa.xcb: could not connect to display 127.0.0.1:86.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

                                Thank you

                                eyllanescE Offline
                                eyllanescE Offline
                                eyllanesc
                                wrote on last edited by
                                #17

                                @RajeshH Are you running Qt Creator on your PC or on a remote host? I point it out because in the log it indicates: qt.qpa.xcb: could not connect to display 127.0.0.1:86.0

                                If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                                1 Reply Last reply
                                1

                                • Login

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