I am trying to distribute my software Brassica as an AppImage. Since this is in most respects a standard Qt application, I was able to follow the instructions in the documentation to create one fairly easily (albeit with a bit of trial-and-error since it depends on some Haskell shared libraries). However, when I attempt to run this AppImage on my machine (EndeavourOS, so practically Arch Linux), I consistently get an error from qt.qpa.plugin
that it ‘Could not find the Qt platform plugin’.
The exact form of the error seems to depend on whether I run X11 or Wayland. With X11, I get:
$ ./Brassica.AppImage
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aborted (core dumped)
Whereas with Wayland I get:
$ ./Brassica.AppImage
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aborted (core dumped)
This behaviour seems to depend on the host system. If I run this AppImage on the same Debian ‘Bullseye’ VM in which it was created, it runs without a problem. However, it appears to be a problem with the AppImage itself rather than my machine: other Qt AppImages seem to open unproblematically, and certainly without complaining about platform plugins. Does anyone have any ideas as to how I can fix this issue?