Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while loading shared libraries: /lib/ld-linux-aarch64.so.1 #2

Open
capruro opened this issue Aug 30, 2020 · 3 comments
Open

error while loading shared libraries: /lib/ld-linux-aarch64.so.1 #2

capruro opened this issue Aug 30, 2020 · 3 comments

Comments

@capruro
Copy link

capruro commented Aug 30, 2020

Hello,
I'm encountering this error when running snapcraft on raspberry pi 4:

$ sudo docker run --rm -it --privileged -v $PWD:$PWD -w $PWD diddledan/snapcraft:core18
systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture arm64.
Set hostname to <a73c267fb926>.
Starting snapd.service via systemd.
Waiting for snapd to be ready...
Snapd is now ready.

Installing snapcraft.
2020-08-30T13:34:57Z INFO Waiting for automatic snapd restart...
snapcraft 4.2 from Canonical✓ installed

Running user script: snap run snapcraft
/snap/snapd/8791/usr/lib/snapd/snap-confine: error while loading shared libraries: /lib/ld-linux-aarch64.so.1: cannot apply additional memory protection after relocation: Permission denied
Finished. The following messages are from systemd closing down, and may be ignored.

I'm running ubuntu 20.04 64bit, docker snap version 19.03.11, build dd360c7

$ snap version
snap    2.45.3.1
snapd   2.45.3.1
series  16
ubuntu  20.04
kernel  5.4.0-1015-raspi
$ snap connections docker 
Interface         Plug                     Slot                       Notes
content           -                        docker:docker-executables  -
docker            docker:docker-cli        docker:docker-daemon       -
docker-support    docker:privileged        :docker-support            -
docker-support    docker:support           :docker-support            -
firewall-control  docker:firewall-control  :firewall-control          -
home              docker:home              :home                      -
network           docker:network           :network                   -
network-bind      docker:network-bind      :network-bind              -
network-control   docker:network-control   :network-control           -
$ snap debug sandbox-features
apparmor:             kernel:caps kernel:dbus kernel:domain kernel:file kernel:mount kernel:namespaces kernel:network kernel:network_v8 kernel:policy kernel:ptrace kernel:query kernel:rlimit kernel:signal parser:unsafe policy:default support-level:full
confinement-options:  classic devmode strict
dbus:                 mediated-bus-access
kmod:                 mediated-modprobe
mount:                freezer-cgroup-v1 layouts mount-namespace per-snap-persistency per-snap-profiles per-snap-updates per-snap-user-profiles stale-base-invalidation
seccomp:              bpf-actlog bpf-argument-filtering kernel:allow kernel:errno kernel:kill_process kernel:kill_thread kernel:log kernel:trace kernel:trap kernel:user_notif
udev:                 device-cgroup-v1 device-filtering tagging

what am I doing wrong? I tried to run it from home and tmp location.
Thank you!

@capruro
Copy link
Author

capruro commented Sep 12, 2020

I got the same issue running the container from an x64 architecture, I believe the issue might be docker in snap.

/snap/snapd/8790/usr/lib/snapd/snap-confine: error while loading shared libraries: /lib/x86_64-linux-gnu/libpthread.so.0: cannot apply additional memory protection after relocation: Permission denied

@lucyllewy
Copy link
Contributor

I don't know what's causing this issue. I'm successfully using the images for https://github.com/diddlesnaps/openra so the images are at least working correctly in GitHub Actions.

@AmazingPP
Copy link

AmazingPP commented Jan 5, 2024

This problem arises because you are using the Snap version of Docker instead of the apt version. To resolve it, uninstall the Snap version of Docker using the command sudo snap remove --purge docker (Note: Back up your current container and image), and then follow this documentation to install Docker.

After a reboot, the problem was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants