Docker: docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object

Today, I started to try some stuff with Docker, after install docker-engine complete smoothly. Next to install docker-compose, I recently got very annoying error on my Ubuntu 16.04 machine. Follow the instruction at https://docs.docker.com/compose/install/ , right on the step 7, after the install complete, I try to test it by command

$ docker-compose --version

But instead of showing the version, it throw error with message

docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object

docker-compose

After some minutes searching on Google, I find out it missing exec permission on /tmp folder. So, I remount the /tmp folder with exec permission and it work perfectly. You can do by follow the command below.

sudo mount /tmp -o remount,exec

Source : https://github.com/docker/compose/issues/1339#issuecomment-196971221

3 thoughts on “Docker: docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object

  1. I just wanted to say thank you. Instead of hours of trouble shooting and pulling my hair out this solved it right away. Thank you for posting how you solve this with good SEO.

Leave a Reply