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. problem with qt.qpa.plugin: running on a docker in Kubuntu

problem with qt.qpa.plugin: running on a docker in Kubuntu

Scheduled Pinned Locked Moved Unsolved General and Desktop
38 Posts 3 Posters 19.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.
  • J Offline
    J Offline
    john_hobbyist
    wrote on last edited by john_hobbyist
    #3

    I included this command inside the docker script:

    QT_DEBUG_PLUGINS=1
    

    I try to build the script and I got this:

    Sending build context to Docker daemon  60.93kB
    Error response from daemon: Dockerfile parse error line 42: unknown instruction: QT_DEBUG_PLUGINS=1
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Because that is not a valid command, if you want to include an environment variable in your Dockerfile, use the ENV command.

      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
      1
      • J Offline
        J Offline
        john_hobbyist
        wrote on last edited by
        #5

        Ok. I got answer with data. What should I look for?

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

          The entry related to xcb, you'll have some information about why it failed to load.

          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
          1
          • J Offline
            J Offline
            john_hobbyist
            wrote on last edited by
            #7

            This is what I found related to xcb:

            Got keys from plugin meta data ("webgl")
            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/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": 331520
            }
            
            
            Got keys from plugin meta data ("xcb")
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
            Cannot load library /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
            QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: 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.
            
            Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
            
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @john_hobbyist said in problem with qt.qpa.plugin: running on a docker in Kubuntu:

              libxcb-util.so.1

              You are missing that file in your Docker image.

              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
              1
              • J Offline
                J Offline
                john_hobbyist
                wrote on last edited by
                #9

                Do I need to install a specific package? Or only the non-existing file? I suppose

                pip3 install ...
                

                ??

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

                  No this is a system library that you need to install using your image distribution package manager.

                  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
                  1
                  • J Offline
                    J Offline
                    john_hobbyist
                    wrote on last edited by john_hobbyist
                    #11

                    How can I achieve this?

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

                      As I wrote above, this is done using the package manager that is provided by the distribution you use as a base for your Docker image. Use a RUN command for that.

                      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
                      1
                      • J Offline
                        J Offline
                        john_hobbyist
                        wrote on last edited by john_hobbyist
                        #13

                        After google search, I found and I tried this command:

                        RUN apt-get install -y libxcb-util1
                        

                        It does not work:

                        E: Unable to locate package libxcb-util1
                        The command '/bin/sh -c apt-get install -y libxcb-util1' returned a non-zero code: 100
                        
                        eyllanescE 1 Reply Last reply
                        0
                        • J john_hobbyist

                          After google search, I found and I tried this command:

                          RUN apt-get install -y libxcb-util1
                          

                          It does not work:

                          E: Unable to locate package libxcb-util1
                          The command '/bin/sh -c apt-get install -y libxcb-util1' returned a non-zero code: 100
                          
                          eyllanescE Offline
                          eyllanescE Offline
                          eyllanesc
                          wrote on last edited by
                          #14

                          @john_hobbyist use: RUN apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev and show the new log

                          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
                          • J Offline
                            J Offline
                            john_hobbyist
                            wrote on last edited by
                            #15
                            QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms" ...
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "eglfs"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QEglFSIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("eglfs")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "linuxfb"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QLinuxFbIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("linuxfb")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "minimal"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QMinimalIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("minimal")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "minimalegl"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QMinimalEglIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("minimalegl")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "offscreen"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QOffscreenIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("offscreen")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "vnc"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QVncIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("vnc")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "wayland-egl"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QWaylandEglPlatformIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("wayland-egl")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "wayland"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QWaylandIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("wayland")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "wayland-xcomposite-egl"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("wayland-xcomposite-egl")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "wayland-xcomposite-glx"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("wayland-xcomposite-glx")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "webgl"
                                    ]
                                },
                                "archreq": 0,
                                "className": "QWebGLIntegrationPlugin",
                                "debug": false,
                                "version": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("webgl")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
                            Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/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": 331520
                            }
                            
                            
                            Got keys from plugin meta data ("xcb")
                            QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
                            Cannot load library /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
                            QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: 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.
                            
                            Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
                            
                            eyllanescE 1 Reply Last reply
                            0
                            • J john_hobbyist
                              QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms" ...
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "eglfs"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QEglFSIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("eglfs")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "linuxfb"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QLinuxFbIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("linuxfb")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "minimal"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QMinimalIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("minimal")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "minimalegl"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QMinimalEglIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("minimalegl")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "offscreen"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QOffscreenIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("offscreen")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "vnc"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QVncIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("vnc")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "wayland-egl"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QWaylandEglPlatformIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("wayland-egl")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "wayland"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QWaylandIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("wayland")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "wayland-xcomposite-egl"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("wayland-xcomposite-egl")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "wayland-xcomposite-glx"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("wayland-xcomposite-glx")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "webgl"
                                      ]
                                  },
                                  "archreq": 0,
                                  "className": "QWebGLIntegrationPlugin",
                                  "debug": false,
                                  "version": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("webgl")
                              QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
                              Found metadata in lib /usr/local/lib/python3.9/site-packages/PyQt5/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": 331520
                              }
                              
                              
                              Got keys from plugin meta data ("xcb")
                              QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
                              Cannot load library /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
                              QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: 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.
                              
                              Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
                              
                              eyllanescE Offline
                              eyllanescE Offline
                              eyllanesc
                              wrote on last edited by eyllanesc
                              #16

                              @john_hobbyist said RUN apt-get install -y libxcb-util-dev, also show the Dockerfile

                              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
                              • J Offline
                                J Offline
                                john_hobbyist
                                wrote on last edited by john_hobbyist
                                #17

                                @eyllanesc said in problem with qt.qpa.plugin: running on a docker in Kubuntu:

                                RUN apt-get install -y libxcb-util-dev

                                Step 19/21 : RUN apt-get install -y libxcb-util-dev
                                 ---> Running in ......
                                Reading package lists...
                                Building dependency tree...
                                Reading state information...
                                E: Unable to locate package libxcb-util-dev
                                The command '/bin/sh -c apt-get install -y libxcb-util-dev' returned a non-zero code: 100
                                

                                Yes, I saw it now:

                                FROM python:3
                                
                                ADD code.py /
                                
                                RUN pip3 install opencv-python-headless
                                RUN apt-get update ##[edited]
                                
                                RUN apt-get install ffmpeg libsm6 libxext6  -y
                                
                                RUN pip3 install matplotlib
                                
                                RUN apt-get install python3-pyqt5 -y
                                
                                RUN pip3 install pyqt5
                                
                                RUN pip3 install wheel
                                
                                RUN pip3 install pandas
                                
                                RUN pip3 install openpyxl
                                
                                RUN pip3 install geopandas
                                
                                # RUN apt update -y
                                
                                # RUN apt install libpq-dev -y
                                
                                # RUN apt install gdal-bin -y
                                
                                # RUN apt install libgdal-dev -y
                                
                                RUN pip3 install numba
                                
                                # RUN pip3 install GDAL
                                
                                RUN apt-get install qt5-default -y
                                
                                RUN pip3 install numpy
                                
                                RUN ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
                                
                                RUN apt-get update -y
                                
                                RUN apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev 
                                
                                RUN apt-get install -y libxcb-util-dev
                                
                                ENV QT_DEBUG_PLUGINS=1
                                
                                CMD [ "python3", "code.py" ]
                                

                                Any idea???

                                eyllanescE 1 Reply Last reply
                                0
                                • J john_hobbyist

                                  @eyllanesc said in problem with qt.qpa.plugin: running on a docker in Kubuntu:

                                  RUN apt-get install -y libxcb-util-dev

                                  Step 19/21 : RUN apt-get install -y libxcb-util-dev
                                   ---> Running in ......
                                  Reading package lists...
                                  Building dependency tree...
                                  Reading state information...
                                  E: Unable to locate package libxcb-util-dev
                                  The command '/bin/sh -c apt-get install -y libxcb-util-dev' returned a non-zero code: 100
                                  

                                  Yes, I saw it now:

                                  FROM python:3
                                  
                                  ADD code.py /
                                  
                                  RUN pip3 install opencv-python-headless
                                  RUN apt-get update ##[edited]
                                  
                                  RUN apt-get install ffmpeg libsm6 libxext6  -y
                                  
                                  RUN pip3 install matplotlib
                                  
                                  RUN apt-get install python3-pyqt5 -y
                                  
                                  RUN pip3 install pyqt5
                                  
                                  RUN pip3 install wheel
                                  
                                  RUN pip3 install pandas
                                  
                                  RUN pip3 install openpyxl
                                  
                                  RUN pip3 install geopandas
                                  
                                  # RUN apt update -y
                                  
                                  # RUN apt install libpq-dev -y
                                  
                                  # RUN apt install gdal-bin -y
                                  
                                  # RUN apt install libgdal-dev -y
                                  
                                  RUN pip3 install numba
                                  
                                  # RUN pip3 install GDAL
                                  
                                  RUN apt-get install qt5-default -y
                                  
                                  RUN pip3 install numpy
                                  
                                  RUN ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
                                  
                                  RUN apt-get update -y
                                  
                                  RUN apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev 
                                  
                                  RUN apt-get install -y libxcb-util-dev
                                  
                                  ENV QT_DEBUG_PLUGINS=1
                                  
                                  CMD [ "python3", "code.py" ]
                                  

                                  Any idea???

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

                                  @john_hobbyist change FROM python:3 to FROM ubuntu:latest. "python: 3" uses a minimalistic version of linux that does not have some packages. Also remove RUN apt-get install qt5-default -y and RUN ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so. If you can't find the pip command then add first: RUN apt install python3-pip

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

                                  J 1 Reply Last reply
                                  1
                                  • eyllanescE eyllanesc

                                    @john_hobbyist change FROM python:3 to FROM ubuntu:latest. "python: 3" uses a minimalistic version of linux that does not have some packages. Also remove RUN apt-get install qt5-default -y and RUN ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so. If you can't find the pip command then add first: RUN apt install python3-pip

                                    J Offline
                                    J Offline
                                    john_hobbyist
                                    wrote on last edited by john_hobbyist
                                    #19

                                    @eyllanesc

                                    Sending build context to Docker daemon  60.93kB
                                    Step 1/19 : FROM ubuntu:latest
                                     ---> ......
                                    Step 2/19 : ADD code.py /
                                     ---> Using cache
                                     ---> .....
                                    Step 3/19 : RUN pip3 install opencv-python-headless
                                     ---> Running in .....
                                    /bin/sh: 1: pip3: not found
                                    The command '/bin/sh -c pip3 install opencv-python-headless' returned a non-zero code: 127
                                    UbuntuUser@ubuntu:~/Desktop/test/my_new_docker_build$
                                    

                                    Does not run more than this step...

                                    eyllanescE 1 Reply Last reply
                                    0
                                    • J john_hobbyist

                                      @eyllanesc

                                      Sending build context to Docker daemon  60.93kB
                                      Step 1/19 : FROM ubuntu:latest
                                       ---> ......
                                      Step 2/19 : ADD code.py /
                                       ---> Using cache
                                       ---> .....
                                      Step 3/19 : RUN pip3 install opencv-python-headless
                                       ---> Running in .....
                                      /bin/sh: 1: pip3: not found
                                      The command '/bin/sh -c pip3 install opencv-python-headless' returned a non-zero code: 127
                                      UbuntuUser@ubuntu:~/Desktop/test/my_new_docker_build$
                                      

                                      Does not run more than this step...

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

                                      @john_hobbyist mmm, you seem to not fully read my comment: add RUN apt install -y python3-pip before RUN pip3 install opencv-python-headless

                                      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
                                      • J Offline
                                        J Offline
                                        john_hobbyist
                                        wrote on last edited by
                                        #21
                                        Sending build context to Docker daemon  60.93kB
                                        Step 1/20 : FROM ubuntu:latest
                                         ---> .....
                                        Step 2/20 : ADD code.py /
                                         ---> Using cache
                                         ---> .....
                                        Step 3/20 : RUN apt install -y python3-pip
                                         ---> Running in ......
                                        
                                        WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
                                        
                                        Reading package lists...
                                        Building dependency tree...
                                        Reading state information...
                                        E: Unable to locate package python3-pip
                                        The command '/bin/sh -c apt install -y python3-pip' returned a non-zero code: 100
                                        
                                        eyllanescE 1 Reply Last reply
                                        0
                                        • J john_hobbyist
                                          Sending build context to Docker daemon  60.93kB
                                          Step 1/20 : FROM ubuntu:latest
                                           ---> .....
                                          Step 2/20 : ADD code.py /
                                           ---> Using cache
                                           ---> .....
                                          Step 3/20 : RUN apt install -y python3-pip
                                           ---> Running in ......
                                          
                                          WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
                                          
                                          Reading package lists...
                                          Building dependency tree...
                                          Reading state information...
                                          E: Unable to locate package python3-pip
                                          The command '/bin/sh -c apt install -y python3-pip' returned a non-zero code: 100
                                          
                                          eyllanescE Offline
                                          eyllanescE Offline
                                          eyllanesc
                                          wrote on last edited by
                                          #22

                                          @john_hobbyist Use minimal Dockerfile

                                          FROM ubuntu:latest
                                          
                                          RUN apt-get update && apt-get autoclean
                                          
                                          RUN apt-get update && apt-get install -y --no-install-recommends python3-pip
                                          
                                          RUN pip3 install pyqt5
                                          
                                          RUN apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev 
                                          
                                          ENV QT_DEBUG_PLUGINS=1
                                          
                                          ADD code.py /
                                          
                                          CMD [ "python3", "code.py" ]
                                          

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

                                          J 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