AppImage 0.1.6 is missing a library
What went wrong?
On version 0.1.6 appImage on Nix stopped working and missing a library
Verbose according my agent:
what's happening:
Nothing is wrong with appimage-run itself — the AppImage is missing a library.
I checked your extracted copy:
- any.appimage bundles usr/lib/libgcrypt.so.20
- that libgcrypt was built with DT_NEEDED: libgpg-error.so.0
- but the AppImage package (linuxdeploy) never bundled libgpg-error.so.0 — find over the whole extraction finds zero gpg files
On a normal distro (Ubuntu/Fedora) this goes unnoticed because libgpg-error is installed system-wide in /usr/lib, and the AppImage links against it at runtime.
On NixOS there is no /usr/lib with system libs. appimage-run creates an FHS sandbox that provides a base set of libs (gtk, glib, X11, etc.), and libgpg-error is not in it. So the loader in the sandbox searches /usr/lib, usr/lib32, usr/lib64 of the FHS env — all 897 libs — and finds no libgpg-error.so.0. Hence the error. The library is a hard dependency, not optional; the app can't start.
Fixes
Quick test (confirmed working — the app launched):
LD_LIBRARY_PATH=/nix/store/161aghkjm32hxmab5blxlsl336fqqb5k-libgpg-error-1.61/lib appimage-run ./any.appimage
/nix is bind-mounted inside the sandbox, so a store path works from within. Don't hardcode that hash — get a fresh one:
LD_LIBRARY_PATH="$(nix-build '<nixpkgs>' -A libgpg-error --no-out-link)/lib" appimage-run ./any.appimage
Permanent (NixOS config), cleanest option:
environment.systemPackages = [
(pkgs.appimageTools.wrapType2 {
name = "anytype";
src = ./any.AppImage;
extraPkgs = pkgs: [ pkgs.libgpg-error ];
})
];
Run that instead of bare appimage-run, and it works like any normal app.
Also worth doing: grab the latest Anytype release. This is a packaging bug in that AppImage build; newer AppImages often bundle it correctly.
Gotcha: if you pick the store path by hand, make sure it's the x86-64 build — several libgpg-error variants in /nix/store are i686, which gives wrong ELF class: ELFCLASS32.
What should happen?
Running app image should be flawless without any issue - on 0.1.5 that was the case.
0 Comments
Sign in to comment
No comments yet. Be the first to share your thoughts.
