首页 > 解决方案 > 无法在 Ubuntu 上安装/运行 docker-ce

问题描述

我在安装 docker-ce 时遇到了一场噩梦。

我之前在我的机器上运行了一个运行不正常的安装,它运行的是旧版本,所以我决定卸载并重新安装最新版本。

完全卸载旧版本和其他可能潜伏的东西我跑了:

sudo apt purge docker docker-ce docker-engine docker.io containerd runc

然后安装我运行的最新版本:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

安装失败并显示:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2019-05-10 12:37:15 BST; 11ms ago
     Docs: https://docs.docker.com
  Process: 6990 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 6990 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.21) ...
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

尝试启动 docker 失败并且 systemctl status docker.service 显示:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-05-10 12:39:07 BST; 36s ago
     Docs: https://docs.docker.com
  Process: 7628 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 7628 (code=exited, status=1/FAILURE)

May 10 12:39:07 accuheat-nuc systemd[1]: docker.service: Service hold-off time over, scheduling restart.
May 10 12:39:07 accuheat-nuc systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
May 10 12:39:07 accuheat-nuc systemd[1]: Stopped Docker Application Container Engine.
May 10 12:39:07 accuheat-nuc systemd[1]: docker.service: Start request repeated too quickly.
May 10 12:39:07 accuheat-nuc systemd[1]: docker.service: Failed with result 'exit-code'.
May 10 12:39:07 accuheat-nuc systemd[1]: Failed to start Docker Application Container Engine.

任何想法可能是什么问题或我如何进一步调查它?

标签: dockerubuntu

解决方案


推荐阅读