20.04 - docker.io : Depends: containerd (>= 1.2.6-0ubuntu1~)

分享于 

3分钟阅读

ubuntu

  繁體

问题:

我在Ubuntu 20.04安装Docker时遇到问题。


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:~$ 



错误消息说需要containerd (>= 1.2.6-0ubuntu1~)

奇怪的是,我已经有了更新的版本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:~$ 



系统已更新,我已经执行sudo apt update && sudo apt upgrade 不需要更新。

在注释中按要求更新


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:~$ 




答案1:

containerdcontainerd.io是2个不同的包。

尝试dpkg -l containerd*,你应该看到两个包。


$ dpkg -l containerd*


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 1.3.3-0ubuntu2 amd64 daemon to control runC


rc containerd.io 1.2.13-2 amd64 An open and reliable container runtime


$ 



如果containerd不在,继续安装它sudo apt install containerd



DOC  DEP  Docker  DOCK  Contain  depends  
相关文章