1

I am running some mysql docker in ubuntu 14.04 for a while. Sometimes, the docker quit suddenly for no reason. While checking the log by running

docker log containerID

, it always give the error like,

/bin/bash: error while loading shared libraries: libncurses.so.5: cannot stat shared object: Error 11

or,

/bin/bash: error while loading shared libraries: libdl.so.2: cannot stat shared object: Error 11

After restarted for several times, the docker can start again without any error. Most of the related resolved question is about the error "cannot stat shared object: No such file or directory". Can you help give some advice to find the root cause?

Docker version:

 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 03:11:13 2017
 OS/Arch:      linux/amd64

Container info:

"Config": {
            "Hostname": "9cb17ec714cb",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "3306/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "MYSQL_ROOT_PASSWORD=XXXXXXXX",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "GOSU_VERSION=1.7",
                "MYSQL_MAJOR=5.7",
                "MYSQL_VERSION=5.7.21-1debian8"
            ],
            "Cmd": [
                "mysqld"
            ],
            "ArgsEscaped": true,
            "Image": "mysql:5.7",
            "Volumes": {
                "/var/lib/mysql": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
5
  • It show missing library. Did you try to install it? apt-get install libncurses Jan 15, 2019 at 13:05
  • @RomeoNinov Thanks for your comment. Do you mean install libncurses in the host linux or inside the docker container? Strangely, when I restarted the container several times, the container can be started successfully, which seems this shared libraries is available without any installation. Today, I encountered this issue again for another docker container which is not related with MySQL inmage.
    – RayTM
    Jan 16, 2019 at 9:09
  • If this is a error from host software install it on host. If you get the error when run other container mean for me the problem is in host machine Jan 16, 2019 at 9:13
  • 1
    @RomeoNinov Understood. Agree with you I should not touch the official docker image and check the libncurses in host machine. I will try in the other day and update the result. Thank you in advance.
    – RayTM
    Jan 16, 2019 at 13:06
  • 1
    @RomeoNinov while trying to run 'apt-get install libncurses', the error 'Unable to locate package libncurses' returned. The command 'sudo apt-get install libncurses5' says it is already the newest version. Finally, run 'sudo apt-get install libncurses5-dev libncursesw5-dev' to install the lib ncurses by referring to google result.
    – RayTM
    Jan 21, 2019 at 3:34

0

You must log in to answer this question.

Browse other questions tagged .