ekrogh
December 8, 2024, 10:48pm
1
Some details about the snapcraft.yaml:
base: core24
snapcraft builds my snap fine, but if I then run
sudo snap run --shell "mySnap"
then I get this message:
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
I do have
stage-packages:
- libproxy1v5
...
(libproxy1v5
is the lib containing libpxbackend-1.0.so
).
How do I solve that ?
ndyer
December 21, 2024, 7:28pm
2
This is a known issue - it’s down to the libpxbackend being in a subdirectory which isn’t on the LD_LIBRARY_PATH. As a workaround, you can add this to your snapcraft.yaml
:
apps:
foo:
environment:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy
See some discussion in this similar pull request:
canonical:main
← sergio-costas:fix-libproxy-path-problem
opened 08:51AM - 29 Jul 24 UTC
libpxbackend is installed at /usr/lib/x86_64-linux-gnu/libproxy, and libproxy se… ts that folder in DT_RUNTIME to be able to find it. Unfortunately, that only works when the library is installed in the standard place, not when it is in a snap (like it is the case with gnome-46-2404), so this change is required.
Fix https://forum.snapcraft.io/t/q-about-migration-to-core24-gnome-46/41100