无法在Ubuntu Xenial上安装Docker:invoke-rc.d:initscript docker,操作“start”失败

jvidinwx  于 2023-06-21  发布在  Docker
关注(0)|答案(3)|浏览(174)

我一直在尝试在Ubuntu 16.04上安装Docker,但它给了我一个错误,我无法自己解决。
使用位于www.example.com的安装脚本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)

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.

对于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]

关于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

我已经尝试手动下载包并使用dkpg安装它,不幸的是,这给出了相同的错误。

0yycz8jy

0yycz8jy1#

经过更多的研究和查看来自journalctl -u docker的日志,我发现了以下行:

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."

原来我的内核不支持Docker。我的错

oalqel3c

oalqel3c2#

在我的例子中,我的内核版本大于3.10.0。但似乎,从一个旧的安装残余是阻止我安装。所以我不得不删除,清除,然后删除以下内容,然后再安装。/usr/lib/docker/ /etc/docker.service.d/

7kqas0il

7kqas0il3#

关于这个问题:我的搞定了我发现我个人机器的系统资源没了,查了一下磁盘剩余为零,用了df-h,释放相应的系统资源后已经恢复希望能帮到你

相关问题