I wanted to try the latest Haruna player (0.10.3), but it is not available as apt
installation (that is 0.9.3), and after installing the snap
version I get this:
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/haruna_haruna.desktop /snap/bin/haruna %u /snap/haruna/11/usr/bin/haruna: error while loading shared libraries: libmsrpc3.so.0: cannot open shared object file: No such file or directory
I read here that I could try sudo apt-get install --reinstall samba-libs
, but that didn't work.
Note after accepting answer:
- the intended version 0.10 was not available on snapstore, but only on flathub; the flatpak version 0.10 is not affected by this problem;
- the accepted answer refers to the only snap version available at the moment of the question (0.9), the one affected by the problem
Confirmed the snapped application is broken. The "missing" library is indeed shipped in the snap, but it's not somewhere in a path that the application will look in.
The publisher needs to modify the
LD_LIBRARY_PATH
in theenvironment
section of theirsnapcraft.yaml
to something like this:LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/samba/
Alternatively, as a workaround, you can fix it locally, temporarily.
Download the snap
Unpack the snap
Modify the snap
I use
nano
but you could use whatever text editor you like.Change this line:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/
To this:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/x86_64-linux-gnu/samba/
Note: Be careful to preserve the indentation, yaml is picky.
The CTRL+X to save.
Repack the snap
Install the snap
Run the snap
Great success!
Although this doesn't give you the version you want, it hopefully explains to you or anyone else how to bodge fix a snap :D