Unable to install Docker on Ubuntu Xenial: invoke-rc.d: initscript docker, action “start” failed

匿名 (未验证) 提交于 2019-12-03 01:10:02

问题:

I've been trying to install Docker on Ubuntu 16.04, but it throws me an error that I am unable to resolve myself.

Using the install script located at get.docker.com:

root@m2dcs44rnq:~# wget -qO- https://get.docker.com/ | sh # Executing docker install script, commit: 92d5116 + sh -c apt-get update -qq >/dev/null + sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null + sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null + sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial edge" > /etc/apt/sources.list.d/docker.list + [ ubuntu = debian ] + sh -c apt-get update -qq >/dev/null + sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. invoke-rc.d: initscript docker, action "start" failed. dpkg: error processing package docker-ce (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  docker-ce E: Sub-process /usr/bin/dpkg returned an error code (1) 

Output of systemctl status docker.service:

● docker.service - Docker Application Container Engine    Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)    Active: inactive (dead) (Result: exit-code) since Sun 2018-04-22 18:26:04 EDT; 24s ago      Docs: https://docs.docker.com   Process: 13857 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)  Main PID: 13857 (code=exited, status=1/FAILURE)  Apr 22 18:26:04 m2dcs44rnq systemd[1]: Failed to start Docker Application Container Engine. Apr 22 18:26:04 m2dcs44rnq systemd[1]: docker.service: Unit entered failed state. Apr 22 18:26:04 m2dcs44rnq systemd[1]: docker.service: Failed with result 'exit-code'. Apr 22 18:26:04 m2dcs44rnq systemd[1]: docker.service: Service hold-off time over, scheduling restart. Apr 22 18:26:04 m2dcs44rnq systemd[1]: Stopped Docker Application Container Engine. Apr 22 18:26:04 m2dcs44rnq systemd[1]: docker.service: Start request repeated too quickly. Apr 22 18:26:04 m2dcs44rnq systemd[1]: Failed to start Docker Application Container Engine. 

Of journalctl -xe:

-- Unit docker.socket has begun starting up. Apr 22 18:47:58 m2dcs44rnq systemd[1]: Listening on Docker Socket for the API. -- Subject: Unit docker.socket has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.socket has finished starting up. -- -- The start-up result is done. Apr 22 18:47:58 m2dcs44rnq systemd[1]: docker.service: Start request repeated to Apr 22 18:47:58 m2dcs44rnq systemd[1]: Failed to start Docker Application Contai -- Subject: Unit docker.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.service has failed. -- -- The result is failed. Apr 22 18:47:58 m2dcs44rnq systemd[1]: docker.socket: Unit entered failed state. Apr 22 18:47:59 m2dcs44rnq sshd[15811]: Failed password for invalid user backupp Apr 22 18:48:00 m2dcs44rnq sshd[15811]: Received disconnect from 2.236.185.188 p Apr 22 18:48:00 m2dcs44rnq sshd[15811]: Disconnected from 2.236.185.188 port 587 lines 1706-1728/1728 (END) -- -- Unit docker.socket has begun starting up. Apr 22 18:47:58 m2dcs44rnq systemd[1]: Listening on Docker Socket for the API. -- Subject: Unit docker.socket has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.socket has finished starting up. -- -- The start-up result is done. Apr 22 18:47:58 m2dcs44rnq systemd[1]: docker.service: Start request repeated too quickly. Apr 22 18:47:58 m2dcs44rnq systemd[1]: Failed to start Docker Application Container Engine. -- Subject: Unit docker.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.service has failed. -- -- The result is failed. Apr 22 18:47:58 m2dcs44rnq systemd[1]: docker.socket: Unit entered failed state. Apr 22 18:47:59 m2dcs44rnq sshd[15811]: Failed password for invalid user backuppc from 2.236.185.188 port 58738 ssh2 Apr 22 18:48:00 m2dcs44rnq sshd[15811]: Received disconnect from 2.236.185.188 port 58738:11: Normal Shutdown, Thank you for playing [preauth] Apr 22 18:48:00 m2dcs44rnq sshd[15811]: Disconnected from 2.236.185.188 port 58738 [preauth] 

And of uname -a:

Linux m2dcs44rnq 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux 

I've already tried downloading the package manually and installing it using dkpg, unfortunately, that gave the same error.

回答1:

After some more research and looking at the logs from journalctl -u docker I found the following line:

Apr 21 18:12:41 m2dcs44rnq dockerd[18728]: time="2018-04-21T18:12:41.088984468-04:00" level=fatal msg="Your Linux kernel version 2.6.32-042stab127.2 is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer." 

It turns out my kernel is not supported for Docker. My bad.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!