How to create AppImage using linuxdeployqt?
-
Hi,
I am trying to build an AppImage for my app which is made using Qt. When I run the AppImage of linuxdeployqt from this site:
https://github.com/probonopd/linuxdeployqt/releasesI get the following error:
"linuxdeployqt (commit deebf70), build 38 built on 2022-12-15 18:06:02 UTC
ERROR: The host system is too new.
Please run on a system with a glibc version no newer than what comes with the oldest
currently still-supported mainstream distribution (Ubuntu Bionic), which is glibc 2.27.
This is so that the resulting bundle will work on most still-supported Linux distributions.
For more information, please see
https://github.com/probonopd/linuxdeployqt/issues/340
"If this tool does not work what is the other official way to build AppImages for your Qt app?
-
@HFT_developer said in How to create AppImage using linuxdeployqt?:
In my virtual machine do I need Qt and clone the repository and basically do everything I would do on my normal linux boot?
Yes.
-
It does work, the error message tells you precisely what to do and why not doing it is wrong: if you run it on too-new system, the AppImage will not work on older system (defeating the whole purpose of having an AppImage). Install some older Linux (can be in a virtual machine or container) and run
linuxdeployqt
there.
Also, click the link the tool prints, it provides a lot of explanations and some workarounds, including links to other tools (which you are asking about). -
@HFT_developer said in How to create AppImage using linuxdeployqt?:
Can docker containers work on linux
Of course :)
@sierdzio How do I run an older version of linux on the current pc which is already booting linux? Can docker containers work on linux or is using a virtual machine better for creating appimage?
Pick whatever you like. For initial setup I'd probably start with a virtual machine because it's a bit easier to work with a GUI. But if you're already familiar with this stuff and only need some solution to generate packages - docker is better then. Faster and easier to integrate into CI.
-
@HFT_developer said in How to create AppImage using linuxdeployqt?:
@sierdzio okay I've finally managed to setup Ubuntu 18.04(Bionic) on vitual box. When I use the
linuxdeployqt
tool do I need to compile on virtual machine or just transfer the executable from my pc to the virtual machine?Compile there, to make sure GLibc compatibility.
-
@sierdzio In the meantime, I managed to deploy my App on windows that was fairly easy. I used
windeployqt
tool which was already inside the bin folder of Qt installation.Now for Linux, I tried using shared folder to share the executable from Ubuntu 22.04(my regular boot) to 18.04(in VM) but when I use
linuxdeployqt
it does not work. In my virtual machine do I need Qt and clone the repository and basically do everything I would do on my normal linux boot? -
@HFT_developer said in How to create AppImage using linuxdeployqt?:
In my virtual machine do I need Qt and clone the repository and basically do everything I would do on my normal linux boot?
Yes.