I'm having a problem to install docker in Ubuntu 20.04.
wolf@linux:~$ sudo apt install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
docker.io : Depends: containerd (>= 1.2.6-0ubuntu1~)
E: Unable to correct problems, you have held broken packages.
wolf@linux:~$
Error message says that I need containerd (>= 1.2.6-0ubuntu1~)
It's strange as I already have even newer version which is 1.2.13-2
wolf@linux:~$ dpkg -l containerd.io
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-======================================
ii containerd.io 1.2.13-2 amd64 An open and reliable container runtime
wolf@linux:~$
The system is updated. I already performed sudo apt update && sudo apt upgrade
and no new update required.
Update as requested in comment
wolf@linux:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
wolf@linux:~$
containerd
andcontainerd.io
are 2 different packages.Try
dpkg -l containerd*
and you should see both packages.If
containerd
not there, go ahead and install it withsudo apt install containerd
.Let me know if this helps.
I had the same error but a more complex situation:
obviously, I overlooked a clear warning while updating:
I didn't dig deeper, but there are newer packages on security, which don't fit together. But it doesn't explain why
docker.io
doesn't accept the installedcontainerd
of version1.3.3-0ubuntu2.3
which is in fact>= 1.2.6-0ubuntu1~
Workaround
I could fix this problem by downgrading
containerd
to the main pool package and then reinstallingdocker.io
:Bug report
Bug report here: https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1940920