docker compose: Error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted

Roberto Gonçalves picture Roberto Gonçalves · Sep 5, 2019 · Viewed 17k times · Source

After installing docker and docker-compose on:

NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"

When executing:

sudo docker-compose -version

It returns:

Error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted

It should return:

docker-compose version 1.25.0-rc2, build 661ac20e

Installation from docker-compose is this

Answer

Roberto Gonçalves picture Roberto Gonçalves · Sep 5, 2019

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