moby: Ubuntu packaging needs a conflict between containerd.io and old runc installs
Description
(This is relaying an issue reported on stackoverflow)
If an older install of runc remains on the docker host, the containerd.io package will fail to upgrade.
Steps to reproduce the issue:
Attempt to upgrade docker-ce to 18.09 on Ubuntu while an older runc package remains.
Describe the results you received:
$ 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).
Forcing the install of containerd.io results in:
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)
Note the older install of runc 1.0.0~rc2+docker1.13.1-0ubuntu1~16.04.1
in the above output.
Describe the results you expected:
The containerd.io package should force the removal of older runc packages to avoid the conflict.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
Not available.
Output of docker info
:
Not available.
Additional environment details (AWS, VirtualBox, physical, etc.):
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 15 (6 by maintainers)
In the meantime, we could adjust the installation docs, and add
runc
andcontainerd
to the list of packages to uninstall before installing.https://docs.docker.com/install/linux/docker-ce/ubuntu/#uninstall-old-versions 🤔FWIW; the following changes were merged in the rpm and deb packages for containerd (and should to out with an upcoming version of the package);
deb spec (“control” file);
RPM spec;
I have the same issue. I am kind of blocked in my job. I even can’t use
apt-get
process properly after I addeddocker
repo. Try to install:Try to fis broken:
Try to remove:
How could I solve this? Even how it happened? Because my docker was working. It just stoped to work maybe after some update. I am able to use package manager only if I remove docker repository. Thank you, Jan.
Thanks for reporting; I opened an internal issue for the packaging team, and opened a “WIP” pull-request in the containerd packaging repo (sorry, looks like it’s still private, so can’t link to it) to try to address this.
One thing I commented on that PR is that we should verify if this will cause issues in future, once runc becomes stable (reaches 1.0), which I just saw being proposed on the runc mailinglist. At that point we may want to allow depending on the distro packages and/or put runc in its own package.
(Currently, the runc version is bundled with the containerd package, and pinned to a specific commit, to prevent incompatibility issues: https://github.com/containerd/containerd/blob/b1e202c32724e82779544365528a1a082b335553/RUNC.md)