docker.io: 종속됨: 컨테이너d(>= 1.2.6-0ubuntu1~)

docker.io: 종속됨: 컨테이너d(>= 1.2.6-0ubuntu1~)

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.io2개의 다른 패키지가 있습니다 .

시도하면 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.

이것이 도움이 된다면 알려주세요.

답변2

동일한 오류가 발생했지만 상황은 더 복잡했습니다.

~# dpkg -l | grep containerd
ii  containerd                            1.3.3-0ubuntu2.3                  amd64        daemon to control runC

~# apt-get 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~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

분명히 업데이트하는 동안 명확한 경고를 간과했습니다.

~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  bridge-utils cgroupfs-mount dns-root-data dnsmasq-base git git-man iptables libcurl3-gnutls liberror-perl libip6tc2 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libnghttp2-14 librtmp1 libssh-4 patch pigz ubuntu-fan
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  docker.io                    ^^^^^^^  !!!
The following packages will be upgraded:
  containerd
1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 27.8 MB of archives.
After this operation, 192 MB disk space will be freed.
Do you want to continue? [Y/n] 

더 깊이 파고들지는 않았지만 서로 맞지 않는 최신 보안 패키지가 있습니다. 그러나 실제로 설치된 버전을 docker.io허용하지 않는 이유는 설명하지 않습니다.containerd1.3.3-0ubuntu2.3>= 1.2.6-0ubuntu1~

~# apt-cache policy docker.io containerd
docker.io:
  Installed: (none)
  Candidate: 19.03.8-0ubuntu1.20.04.1
  Version table:
     19.03.8-0ubuntu1.20.04.1 500
        500 http://ch.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     19.03.8-0ubuntu1 500
        500 http://ch.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

containerd:
  Installed: 1.3.3-0ubuntu2.3
  Candidate: 1.3.3-0ubuntu2.3
  Version table:
 *** 1.3.3-0ubuntu2.3 500
        500 http://ch.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.3.3-0ubuntu2 500
        500 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 Packages

해결 방법

containerd기본 풀 패키지로 다운그레이드한 후 다시 설치하면 이 문제를 해결할 수 있습니다 docker.io.

~# apt-get install containerd=1.3.3-0ubuntu2
The following packages will be DOWNGRADED:
  containerd
~# apt-get install docker.io

버그 신고

여기에 버그 신고:https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1940920

관련 정보