Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. cqtdeployer Could not load the Qt platform plugin "xcb"

cqtdeployer Could not load the Qt platform plugin "xcb"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
cqtdeployer
6 Posts 4 Posters 1.4k 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.
  • R Offline
    R Offline
    rtvideo
    wrote on last edited by
    #1

    Hello, When I try to create an installer with cqtdeployer, I am unable to create a package that is able to run without installing any extra packages.

    I did "cqtdeployer -bin camera -qmake /home/username/Qt/5.15.0/gcc_64/bin/qmake qif"

    When trying to run on a computer that does not have any qt packages installed I get an error of:

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/username/Downloads/tets/camera/plugins/platforms:" 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

    Aborted (core dumped)

    If i installed: sudo apt-get install libxcb-xinerama0 than my program will run without any errors.
    My question is how do I create the package with the "xcb" plugin included already so I wouldnt have to install it on another computer when running the executable.

    JonBJ jsulmJ 2 Replies Last reply
    0
    • R rtvideo

      Hello, When I try to create an installer with cqtdeployer, I am unable to create a package that is able to run without installing any extra packages.

      I did "cqtdeployer -bin camera -qmake /home/username/Qt/5.15.0/gcc_64/bin/qmake qif"

      When trying to run on a computer that does not have any qt packages installed I get an error of:

      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/username/Downloads/tets/camera/plugins/platforms:" 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

      Aborted (core dumped)

      If i installed: sudo apt-get install libxcb-xinerama0 than my program will run without any errors.
      My question is how do I create the package with the "xcb" plugin included already so I wouldnt have to install it on another computer when running the executable.

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

      @rtvideo
      This has been asked before, and is problematic.

      To satisfy your requirement you would have to do something about packaging whatever gets fetched by sudo apt-get install libxcb-xinerama0. And that varies by, say, OS distro, plus anything you did package would get out of date over time/upgrade of existing OS. So how do you propose to bundle an always-valid-and-up-to-date libxcb-xinerama0 with your app?

      1 Reply Last reply
      1
      • R Offline
        R Offline
        rtvideo
        wrote on last edited by
        #3

        @JonB Yes exactly, and I am not sure how I would do it exactly that is why I made the post and see if anyone knew a way that had been done.

        JonBJ 1 Reply Last reply
        0
        • R rtvideo

          @JonB Yes exactly, and I am not sure how I would do it exactly that is why I made the post and see if anyone knew a way that had been done.

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

          @rtvideo
          I don't see how it can be done, cross-platform and kept up-to-date.

          The "correct"/best way is to run e.g. sudo apt-get install libxcb-xinerama0 on the target system, if necessary.

          Perhaps you should consider who your targets are and what is required to satisfy them.

          I will leave to others now to comment otherwise.

          1 Reply Last reply
          1
          • R rtvideo

            Hello, When I try to create an installer with cqtdeployer, I am unable to create a package that is able to run without installing any extra packages.

            I did "cqtdeployer -bin camera -qmake /home/username/Qt/5.15.0/gcc_64/bin/qmake qif"

            When trying to run on a computer that does not have any qt packages installed I get an error of:

            qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/username/Downloads/tets/camera/plugins/platforms:" 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

            Aborted (core dumped)

            If i installed: sudo apt-get install libxcb-xinerama0 than my program will run without any errors.
            My question is how do I create the package with the "xcb" plugin included already so I wouldnt have to install it on another computer when running the executable.

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

            @rtvideo said in cqtdeployer Could not load the Qt platform plugin "xcb":

            My question is how do I create the package with the "xcb" plugin included already

            As @JonB said: this is hardly doable as Linux distributions are too different. What you could do is to provide something like https://flatpak.org/ of your application to include all dependencies of your app in one package.

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

            1 Reply Last reply
            0
            • EndrII 0E Offline
              EndrII 0E Offline
              EndrII 0
              wrote on last edited by
              #6

              Hello
              This is a bug in the cqtdeployer tool. Fixed now.
              Just update your cqtdeployer to version 1.4.7

              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