electrum icon indicating copy to clipboard operation
electrum copied to clipboard

AppImage fails to load libfuse.so.2

Open AlistairTB opened this issue 3 years ago • 6 comments

When running the appimage in Ubuntu (since jammy), currently kinetic 22.10), I get the erorr "error loading libfuse2.so.2".

To resolve, I must install libfuse2.so.2 with "apt install libfuse2".

libfuse2 has been deprecated and the default now is libfuse3.

AlistairTB avatar Dec 25 '22 17:12 AlistairTB

This is a known upstream issue, see https://github.com/AppImage/AppImageKit/issues/1120 and https://docs.appimage.org/user-guide/troubleshooting/fuse.html#ref-ug-troubleshooting-fuse-fuse3

Unsure what we should do...

SomberNight avatar Dec 30 '22 01:12 SomberNight

It looks like most distributions allow co-installation of fuse2 and fuse3, judging from the documentation at https://docs.appimage.org/user-guide/troubleshooting/fuse.html#ref-ug-troubleshooting-fuse-fuse3 (and confirmed by my local Debian install).

https://github.com/AppImage/AppImageKit/issues/1120 however seems to indicate Ubuntu makes these fuse versions mutually exclusive. I don't see an easy fix for us. It's probably best to file a bug for ubuntu, requesting a change to packaging to support co-installation of fuse2 and 3.

accumulator avatar Dec 30 '22 12:12 accumulator

https://github.com/AppImage/AppImageKit/issues/1120 however seems to indicate Ubuntu makes these fuse versions mutually exclusive. I don't see an easy fix for us. It's probably best to file a bug for ubuntu, requesting a change to packaging to support co-installation of fuse2 and 3.

There are a lot of comments in that thread, where exactly do they say that? IIUC, libfuse2 and libfuse3 can be co-installed. See e.g. https://github.com/AppImage/AppImageKit/issues/1120#issuecomment-1119652883 :

Installing fuse apparently breaks stuff, but installing just libfuse2 seems to work.


Appimage devs seem to have ~fixed this issue by rewriting large parts of their toolchain: IIUC AppImageKit/appimagetool (C tool) might be deprecated at some point in favour of go-appimage/appimagetool (golang tool). The C library creates binaries that are dynamically linked against libfuse2, however the go library creates binaries that are statically linked, which would solve the problem. However, AFAICT the go library is still not considered production-ready. (based on https://github.com/AppImage/AppImageKit/issues/1120#issuecomment-1203582841)

SomberNight avatar Dec 30 '22 14:12 SomberNight

There are a lot of comments in that thread, where exactly do they say that?

I inferred it from

    22:03:42 pkkid-ubuntu ~: sudo apt-get install fuse
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
      libfuse2
    The following packages will be REMOVED:
      fuse3 xdg-desktop-portal xdg-desktop-portal-gtk
    The following NEW packages will be installed:
      fuse libfuse2
    0 upgraded, 2 newly installed, 3 to remove and 11 not upgraded.
    Need to get 0 B/117 kB of archives.
    After this operation, 1,120 kB disk space will be freed.
    Do you want to continue? [Y/n] 

Hmm now that I re-read this, it might be just the cli frontend (fuse), not the lib (libfuse2) that is mutually exclusive. I don't have an ubuntu install to test right now, sorry.

accumulator avatar Dec 30 '22 14:12 accumulator

I am able to resolve the issue by simply installing the libfuse2 package. I am unaware of any ill effects of doing this. I'll settle for this workaround until the upstream stuff gets worked out. Thank you for the amazing work!

AlistairTB avatar Dec 30 '22 14:12 AlistairTB

We should migrate to the new https://github.com/AppImage/appimagetool (from https://github.com/AppImage/AppImageKit), I believe that would fix this. As part of that, we will also have to build https://github.com/AppImage/type2-runtime (or maybe download a binary but looks like there are no official releases), as otherwise new appimagetool just downloads the "latest" from the internet. see https://github.com/AppImage/appimagetool/blob/7cfafc45e5a8e64ad0755870b1001e5d7ffb4e85/README.md#L61

ref https://github.com/spesmilo/electrum/commit/d17c4beee9d94dba840dcb2726444e4e980327c0

SomberNight avatar Jun 06 '25 14:06 SomberNight