docker compose: Error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted
Got it solved by re-mounting the /tmp to give the volume permission to execute (it was accessible with read-only). So this solved:
sudo mount /tmp -o remount,exec
conda.exe: error while loading shared libraries: libz.so.1
The problem may be your /tmp
is set to noexec
in /etc/fstab
. Verify with grep tmp /etc/fstab
.
Run the installer with TMPDIR
set to a directory you have write permissions to, on a file system with executable permission. i.e.:
mkdir /users/$USER/tmpconda
TMPDIR=/users/$USER/tmpconda bash Miniconda2-latest-Linux-x86_64.sh
Solution was found at Anaconda Issues 11587
A quick test of executability on a file system:
$ touch foo && chmod +x foo && ./foo
-bash: ./foo: Permission denied
noexec
will cause "Permission denied" even if x
is set on the file.
Docker and Mysql: libz.so.1: cannot open shared object file: Permission denied
So I solved the issue by using the devicemapper storage backend, as suggested by @jpetazzo.
Steps I carried out:
- Stopped the
docker
deamon - Started the
docker
deamon with commanddocker -d -s="devicemapper"
- Ran the
docker run
on the Dockerfile command again. And it worked without any problems.
What are possible causes of failed to map segment from shared object: operation not permitted , and how to debug?
The issue was with how the executables were compiled. They needed to be compiled with a cross compiler that properly supported newer arm devices. The compiler I used generated executables that would only work on a subset of arm devices. The issue was not with the different versions of android.
Varnish fails to start with : failed to map segment from shared object: Operation not permitted
As part of varnish's startup, it generates a loadable library of the configuration of it's behaviour. This gets compiled and loaded at run-time by varnishd. This is the thing that is being complained about with the error:
Compiled VCL program failed to load:
./vcl.1P9zoqAU.so: failed to map segment from shared object: Operation not permitted
VCL compilation failed
i.e. it's a dlopen
call that's failing. The newer version has a slightly more obvious message where it says:
dlopen(vcl_boot/vgc.so) = failed to map segment from shared object: Operation not permitted
In this case, the directory that the .so
is placed in resides on a filesystem that is mounted with the noexec
option, which causes the dlopen
to fail.
Addressing this requires remounting this file system with the exec
option.
Related Topics
How to Remove Jenkins Completely from Linux
Running as a Host User Within a Docker Container
Process Permanently Stuck on D State
Eclipse - Changing Font Size in Project/Package Explorer
Storing & Accessing Up to 10 Million Files in Linux
When a Parent Process Is Killed by "Kill -9", Will Subprocess Also Be Killed
How to Programmatically Switch to a Specific Window in Compiz
How to Configure Curl to Only Show Percentage
Startup Script with Systemd in Linux
Linux Kernel Interrupt Handler Mutex Protection
How to Run Processes Piped with Bash on Multiple Cores
Why Linux Kernel Zone_Normal Is Limited to 896 Mb
Automatic Docker Login Within a Bash Script
Are There Any Good Postgresql Clients for Linux
Best Way to Divide in Bash Using Pipes
How to Calculate System Memory Usage from /Proc/Meminfo (Like Htop)