Ubuntu16.04升级docker ce错误:Depends: libseccomp2 (>= 2.3.0) but 2.2.3-3ubuntu3 is to be installed

环境:

系统:Ubuntu16.04

docker old version: Docker version 1.10.3, build 20f81dd

按照官方给出的步骤安装:https://docs.docker.com/install/linux/docker-ce/ubuntu/

前面一直很顺利,执行到 apt-get install docker-ce=5:18.09.2~3-0~ubuntu-xenial docker-ce-cli=5:18.09.2~3-0~ubuntu-xenial containerd.io(安装docker ce)报错,错误信息为: Depends: libseccomp2 (>= 2.3.0) but 2.2.3-3ubuntu3 is to be installed

apt-get install docker-ce=5:18.09.2~3-0~ubuntu-xenial docker-ce-cli=5:18.09.2~3-0~ubuntu-xenial containerd.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:
 containerd.io : Depends: libseccomp2 (>= 2.3.0) but 2.2.3-3ubuntu3 is to be installed
 docker-ce : Depends: libseccomp2 (>= 2.3.0) but 2.2.3-3ubuntu3 is to be installed
             Recommends: aufs-tools but it is not going to be installed
             Recommends: cgroupfs-mount but it is not going to be installed or
                         cgroup-lite but it is not going to be installed
             Recommends: git
             Recommends: pigz but it is not going to be installed
             Recommends: apparmor but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决方法:先执行add-apt-repository ppa:ubuntu-sdk-team/ppa,然后执行apt-get update,最后再执行安装命令apt-get install docker-ce=5:18.09.2~3-0~ubuntu-xenial docker-ce-cli=5:18.09.2~3-0~ubuntu-xenial containerd.io既可以下载了,貌似跟Ubuntu16.04有关系。

~# add-apt-repository ppa:ubuntu-sdk-team/ppa
 Ubuntu SDK Release PPA for Ubuntu 14.04 LTS, 16.04 LTS and 16.10.

Install SDK with:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt update && sudo apt dist-upgrade && sudo apt install ubuntu-sdk-ide

Ubuntu 15.04 and 15.10 have reached end of support, please upgrade to 16.04 LTS as soon as possible.

== Older Ubuntu SDK ==

The old style SDK with the name "ubuntu-sdk" is no longer in use. This PPA offers the new self-contained SDK "ubuntu-sdk-ide", and the old SDK package is no longer included atall in Ubuntu 16.10 and newer. The ubuntu-sdk version in 16.04/14.04 is outdated so ubuntu-sdk-ide from this PPA should always be used instead.

Old Ubuntu 12.04 LTS Qt 5.0 packages have been moved to https://launchpad.net/~canonical-qt5-edgers/+archive/ubuntu/ubuntu1204-qt5/
 More info: https://launchpad.net/~ubuntu-sdk-team/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpldh0feyl/secring.gpg' created
gpg: keyring `/tmp/tmpldh0feyl/pubring.gpg' created
gpg: requesting key C7122F9B from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpldh0feyl/trustdb.gpg: trustdb created
gpg: key C7122F9B: public key "Launchpad PPA for Ubuntu SDK team" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
root@shldenpg013:~# apt-get update

参考:https://stackoverflow.com/questions/48002345/docker-ce-depends-libseccomp2-2-3-0-but-2-2-3-3ubuntu3-is-to-be-installe

猜你喜欢

转载自blog.csdn.net/liurizhou/article/details/88125603