moby: Docker: error while loading shared libraries: libsystemd-journal.so.0: cannot open shared object file: No such file or directory

I’m using Docker version:

Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   a34a1d5
 Built:        Fri Nov 20 13:25:01 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   a34a1d5
 Built:        Fri Nov 20 13:25:01 UTC 2015
 OS/Arch:      linux/amd64

I have a Jenkins-container running in my Docker Environment. When I’m accessing the Jenkins-container and try to perform a Docker-command I got this error:

libsystemd-journal.so.0: cannot open shared object file: No such file or directory

I tried:

[root@localhost ~]#  cd /lib64/
[root@localhost lib64]# ln -s /lib64/libdevmapper.so.1.02 /lib64/libdevmapper.so.1.02.1
[root@localhost lib64]# ldconfig 
[root@localhost lib64]# ldconfig -v |grep libdevmapper.so.1.02.1 libdevmapper.so.1.02 -> libdevmapper.so.1.02.1
grep: input file ‘libdevmapper.so.1.02’ is also the output
ldconfig: Can't stat /libx32: No such file or directory
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
ldconfig: File /lib64/libdevmapper.so.1.02.1 is empty, not checked.
ldconfig: File /lib64/libdevmapper.so.1.02 is empty, not checked.
[root@localhost lib64]# docker
docker: error while loading shared libraries: /lib64/libdevmapper.so.1.02: file too short

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

Thanks for the heads up @thaJeztah. I modified my script to be RUN curl -L https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 > /usr/bin/docker && chmod +x /usr/bin/docker

@lorenzvth7, I encountered the same problem while using the image jenkins from rancher catalog where by default they use to bind-mount docker inside the container

volumes: - ‘/var/run/docker.sock:/var/run/docker.sock’ - ‘/usr/bin/docker:/usr/bin/docker’

In my case my os was centos and inside the container the os is debian so docker won’t work.

I fix this by installing proper docker binary inside the jenkins(debian) container and only bind-mound the docker socket.