Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

    Installation and Deployment
    3
    15
    354
    Loading More Posts
    • 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.
    • A
      austom last edited by austom

      Hello guys!
      I am a new user of linux. My version of linux is CentOS Linux release 7.3.1611 (Core).The reason for this problem is because I am using a python script (matplotlib) for drawing.

      python3.7 ../../scripts/compare_design_to_control.py control.fasc design.fasc
      

      Then it shows :

      Got keys from plugin meta data ("xcb")
      QFactoryLoader::QFactoryLoader() looking at "/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4"
      QElfParser: '/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4' is not an ELF object (file too small)
      "'/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4' is not an ELF object (file too small)" 
               not a plugin
      QFactoryLoader::QFactoryLoader() checking directory path "/data/home/ldx022/miniconda3/envs/bio/bin/platforms" ...
      Cannot load library /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)
      QLibraryPrivate::loadPlugin failed on "/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libqxcb.so" : "Cannot load library /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: 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, minimal, minimalegl, offscreen, vnc, webgl, xcb.
      
      Aborted
      
      

      I looked at lots of solutions to similar problems before asking this question.Unlike in the previous cases, since I am using the research group's server, I cannot use the simplest yum command to install the corresponding dependency libraries because I have no root premission. So I use a number of methods including the use of

      rpm2cpio XCB util - wm - 0.4.1-5. El7. Aarch64. RPM | cpio - idvm
      

      this command to the corresponding dependent libraries the installation of RPM package.After that I change the ~.bashrc file in a correct path:
      c23c69d2-a6bd-46a2-8d0d-6ad15fb4abad-image.png

      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/home/ldx022/lib/usr/lib64
      
      

      and use the ldd command it turns out the way doesn't work at all.

      (bio) [ldx022@mn01 my_files]$ cd /data/home/ldx022/miniconda3/envs/bio/plugins/platforms
      (bio) [ldx022@mn01 platforms]$ ldd libqxcb.so
      linux-vdso.so.1 =>  (0x00007ffe6d053000)
      	libQt5XcbQpa.so.5 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libQt5XcbQpa.so.5 (0x00007f4865f82000)
      	libfontconfig.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libfontconfig.so.1 (0x00007f4865f34000)
      	libfreetype.so.6 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libfreetype.so.6 (0x00007f4865e7b000)
      	libz.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libz.so.1 (0x00007f4865e5d000)
      	libQt5Gui.so.5 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libQt5Gui.so.5 (0x00007f48659fa000)
      	libQt5DBus.so.5 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libQt5DBus.so.5 (0x00007f4865992000)
      	libQt5Core.so.5 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libQt5Core.so.5 (0x00007f4865512000)
      	libGL.so.1 => /lib64/libGL.so.1 (0x00007f4865269000)
      	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f486504d000)
      	libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007f4864e4b000)
      	libxcb-icccm.so.4 => not found
      	libxcb-image.so.0 => not found
      	libxcb-atom.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-atom.so.1 (0x00007f4864c45000)
      	libxcb-aux.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-aux.so.0 (0x00007f4864a40000)
      	libxcb-event.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-event.so.1 (0x00007f486483b000)
      	libxcb-keysyms.so.1 => not found
      	libxcb-randr.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-randr.so.0 (0x00007f4864827000)
      	libxcb-render-util.so.0 => not found
      	libxcb-render.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-render.so.0 (0x00007f4864817000)
      	libxcb-shape.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-shape.so.0 (0x00007f4864810000)
      	libxcb-sync.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-sync.so.1 (0x00007f4864806000)
      	libxcb-xfixes.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-xfixes.so.0 (0x00007f48647fb000)
      	libxcb-xinerama.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-xinerama.so.0 (0x00007f48647f4000)
      	libxcb-xkb.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-xkb.so.1 (0x00007f48647d3000)
      	libxcb-xinput.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-xinput.so.0 (0x00007f48647ad000)
      	libxcb.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb.so.1 (0x00007f4864780000)
      	libxcb-shm.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxcb-shm.so.0 (0x00007f486477a000)
      	libXext.so.6 => /lib64/libXext.so.6 (0x00007f4864568000)
      	libX11.so.6 => /lib64/libX11.so.6 (0x00007f4864229000)
      	libSM.so.6 => /lib64/libSM.so.6 (0x00007f4864021000)
      	libICE.so.6 => /lib64/libICE.so.6 (0x00007f4863e05000)
      	libxkbcommon-x11.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxkbcommon-x11.so.0 (0x00007f4863dfa000)
      	libxkbcommon.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libxkbcommon.so.0 (0x00007f4863db7000)
      	libdl.so.2 => /lib64/libdl.so.2 (0x00007f4863bb3000)
      	libstdc++.so.6 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libstdc++.so.6 (0x00007f486399e000)
      	libm.so.6 => /lib64/libm.so.6 (0x00007f486369c000)
      	libgcc_s.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libgcc_s.so.1 (0x00007f4863682000)
      	libc.so.6 => /lib64/libc.so.6 (0x00007f48632c0000)
      	libxcb-icccm.so.4 => not found
      	libxcb-image.so.0 => not found
      	libxcb-keysyms.so.1 => not found
      	libxcb-render-util.so.0 => not found
      	libgthread-2.0.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libgthread-2.0.so.0 (0x00007f48632b9000)
      	libglib-2.0.so.0 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libglib-2.0.so.0 (0x00007f4863182000)
      	libxml2.so.2 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libxml2.so.2 (0x00007f4863019000)
      	libpng16.so.16 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libpng16.so.16 (0x00007f4862fe0000)
      	libdbus-1.so.3 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libdbus-1.so.3 (0x00007f4862f8a000)
      	libicui18n.so.58 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libicui18n.so.58 (0x00007f4862d0b000)
      	libicuuc.so.58 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libicuuc.so.58 (0x00007f4862b57000)
      	libicudata.so.58 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libicudata.so.58 (0x00007f4861255000)
      	libzstd.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/./libzstd.so.1 (0x00007f4861183000)
      	/lib64/ld-linux-x86-64.so.2 (0x00007f4866066000)
      	libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f4860f50000)
      	libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f4860c9a000)
      	libXau.so.6 => /lib64/libXau.so.6 (0x00007f4860a95000)
      	libuuid.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/libuuid.so.1 (0x00007f4860a8c000)
      	libpcre.so.1 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/././libpcre.so.1 (0x00007f4860a44000)
      	liblzma.so.5 => /data/home/ldx022/miniconda3/envs/bio/plugins/platforms/./../../lib/././liblzma.so.5 (0x00007f4860a1b000)
      	librt.so.1 => /lib64/librt.so.1 (0x00007f4860812000)
      
      

      libxcb-icccm.so.4 still cannot be found.I ran out the ideas of it.Any suggestions would be appreaciated!

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Did you check if ˋ/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4ˋ is somehow corrupted as the error message suggests ?

        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 Reply Quote 1
        • A
          austom last edited by

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

          QFactoryLoader::QFactoryLoader() looking at "/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4"
          QElfParser: '/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4' is not an ELF object (file too small)
          "'/data/home/ldx022/miniconda3/envs/bio/plugins/platforms/libxcb-icccm.so.4' is not an ELF object (file too small)"
          not a plugin

          Thank you for your reply.
          You mean this section?
          2c25a122-b690-47de-af7e-feefd8a09b88-image.png

          I have created a corresponding soft link for libxcb-icccm.so.4 to the corresponding file in the corresponding folder.But it doesn't work at all.
          5d2688be-37bc-4464-bc8b-1211cd70956b-image.png

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            You should rather check your conda environment. That library should not be broken inside it.

            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 Reply Quote 0
            • A
              austom last edited by

              e372a61a-0ee3-40f0-9853-486d196d611b-image.png
              The environment variables look like this, but I still can't find what went wrong.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Not the environment variables, the conda environment content itself.

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

                A 1 Reply Last reply Reply Quote 0
                • A
                  austom @SGaist last edited by

                  @SGaist
                  Sorry I misunderstood.But how to check if there is a problem with the library?
                  533ca26c-ab15-484c-97d7-2aada235cd38-image.png
                  e0b3a415-49e2-4942-b3c2-1f57dd04f8a5-image.png
                  I also created soft links in it.But that doesn't seem to work

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    The main issue from your picture seems that the library seems to be missing. You only have one link and not the final library itself.

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

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      austom @SGaist last edited by

                      @SGaist
                      I have downloaded the .rpm file and use the following command to install it.

                      rpm2cpio XCB util - wm - 0.4.1-5. El7. Aarch64. RPM | cpio - idvm
                      

                      But I didn't instaill it in the conda.Should I install them in the conda environment?
                      ed48ad87-78dc-48b7-9968-ca2a4365d4a7-image.png

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Wait, the original error was that there was an issue with the library file. Now you are modifying your system installation while I am suggesting to check the content of your conda environment.

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

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          austom @SGaist last edited by

                          @SGaist
                          You mean I can't use the soft link instead of original file in the conda environment?

                          1 Reply Last reply Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            No, I mean you should search why your environment was corrupted rather than trying to force it working using libraires from somewhere else.

                            One simple way would be to create a new environment from scratch to see if you have the same issue.

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

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              austom @SGaist last edited by

                              @SGaist I have created a new conda environment. But the problem remains unresolved.The entire process of creating an environment from scratch is as follows.
                              11b3a05f-b9a8-4421-84f0-d862a02e98f4-image.png
                              367296fe-b7aa-4e07-892e-ec831f38f6b9-image.png
                              249ba189-3392-43b2-84cd-100fccfab52e-image.png
                              a25c8969-b1da-4cf3-aa13-be7546284442-image.png

                              1 Reply Last reply Reply Quote 0
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                Please stop installing system packages in your conda environment. The goal of a new environnement is to start debugging your issue from scratch.

                                So please, create a new environment without installing anything other than conda packages.

                                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 Reply Quote 0
                                • A
                                  alex smith last edited by

                                  On Linux, the xcb QPA (Qt Platform Abstraction) platform plugin is used. It provides the basic functionality needed by Qt GUI and Qt Widgets to run against X11. Its library dependencies are described the following table..

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post