Ubuntu 16.04最新更新破解了Docker(docker-ce)

Rob*_*452 16 linux ubuntu docker ubuntu-16.04

我在桌面上运行Ubuntu 16.04.我使用docker-ce,它一直在工作,直到几天前.Ubuntu中的自动更新似乎打破了它.

robert@catness:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Run Code Online (Sandbox Code Playgroud)

我尝试按照https://docs.docker.com/install/linux/docker-ce/ubuntu/上的说明删除并重新安装,但它没有工作.

robert@catness:~$ sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
docker-ce is already the newest version (5:18.09.0~3-0~ubuntu-xenial).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 docker-ce : Depends: containerd.io but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Run Code Online (Sandbox Code Playgroud)

我相信问题在于containerd.io.命令sudo apt-get -f install尝试安装它并出现以下错误:

The following additional packages will be installed:
  containerd.io
The following NEW packages will be installed
  containerd.io
0 to upgrade, 1 to newly install, 0 to remove and 1 not to upgrade.
1 not fully installed or removed.
Need to get 0 B/19.9 MB of archives.
After this operation, 87.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 523620 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.2.0-1_amd64.deb ...
Unpacking containerd.io (1.2.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/containerd.io_1.2.0-1_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/runc', which is also in package runc 1.0.0~rc2+docker1.13.1-0ubuntu1~16.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/containerd.io_1.2.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

/ usr/sbin/runc存在一些问题,作为调试的一部分我尝试删除那里的文件,但这没有任何区别:

robert@catness:~$ ls /usr/sbin/runc
ls: cannot access '/usr/sbin/runc': No such file or directory
robert@catness:~$ sudo ls /usr/sbin/runc
ls: cannot access '/usr/sbin/runc': No such file or directory
Run Code Online (Sandbox Code Playgroud)

有没有人对我接下来要调查此问题应该做些什么有任何建议.

BMi*_*tch 30

我要删除runc包裹.该docker1.13.1版本是指向一个非常古老且不受支持的docker版本的指针,因此可能会从过去的升级中遗留下来.然后你应该能够安装containerd.io.

您可能必须首先使用docker-ce软件包apt-get remove docker-ce,然后再执行您apt-get remove runc需要再次安装docker-ce apt-get install docker-ce.这是因为尝试在不首先删除docker-ce的情况下删除runc不起作用

如果成功的话,请告诉我,因为如果还不存在,我想在docker中打开一个问题.

  • 谢谢你的解决方案.我已经运行,apt-get删除docker-ce然后apt-get删除runc然后apt-get install docker-ce并且它工作,docker现在备份并运行.(尝试删除runc而不先删除docker-ce不起作用.) (6认同)