首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu 16.04最新更新打破了Docker (docker-ce)

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

Stack Overflow用户
提问于 2018-11-12 04:16:38
回答 1查看 9.6K关注 0票数 16

我在我的桌面上运行Ubuntu 16.04。我使用docker-ce,直到几天前它还在运行。Ubuntu中的自动更新似乎破坏了它。

代码语言:javascript
复制
robert@catness:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

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

代码语言:javascript
复制
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).

我认为问题出在containerd.io上。命令sudo apt-get -f install尝试安装它,但出现以下错误:

代码语言:javascript
复制
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)

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

代码语言:javascript
复制
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

有人对我下一步应该做什么来调查这个问题有什么建议吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-11-12 04:19:42

我会删除runc包。docker1.13.1版本是一个指向非常老的和不受支持的docker版本的指针,所以这可能是过去的升级遗留下来的。然后,您应该能够安装containerd.io.

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

让我知道,如果这是成功的,因为我想打开一个问题在docker,如果一个还不存在。

票数 30
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53252818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档