Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

cqtdeployer Could not load the Qt platform plugin "xcb"



  • 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.



  • @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?



  • @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.



  • @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.


  • Lifetime Qt Champion

    @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.



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


Log in to reply