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.
$ ls -l /snap/haruna/current/usr/lib/x86_64-linux-gnu/samba/libmsrpc3.so.0
-rw-r--r-- 1 root root 145712 Jul 18 2022 /snap/haruna/current/usr/lib/x86_64-linux-gnu/samba/libmsrpc3.so.0
The publisher needs to modify the LD_LIBRARY_PATH
in the environment
section of their snapcraft.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
$ mkdir ~/harunatemp
$ cd ~/harunatemp
$ snap download haruna --candidate
Fetching snap "haruna"
Fetching assertions for "haruna"
Install the snap with:
snap ack haruna_11.assert
snap install haruna_11.snap
Unpack the snap
$ unsquashfs haruna_11.snap
Parallel unsquashfs: Using 16 processors
2267 inodes (4522 blocks) to write
[===========================|] 6789/6789 100%
created 1971 files
created 280 directories
created 280 symlinks
created 0 devices
created 0 fifos
created 0 sockets
created 16 hardlinks
Modify the snap
I use nano
but you could use whatever text editor you like.
$ nano ~/harunasnap/squashfs-root/meta/snap.yaml
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
$ snap pack squashfs-root
built: haruna_0.9.1_amd64.snap
Install the snap
$snap install ./haruna_0.9.1_amd64.snap --dangerous
haruna 0.9.1 installed
Run the snap
$ snap run haruna
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