Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我能';无法安装Docker,因为containerd.io没有安装候选_Docker_Ubuntu - Fatal编程技术网

我能';无法安装Docker,因为containerd.io没有安装候选

我能';无法安装Docker,因为containerd.io没有安装候选,docker,ubuntu,Docker,Ubuntu,我试图在Kubuntu 19.10上安装Docker 我使用以下步骤安装: 在步骤2中,在添加了存储库和密钥之后,我收到了这条消息 Package containerd.io is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

我试图在Kubuntu 19.10上安装Docker

我使用以下步骤安装:

在步骤2中,在添加了存储库和密钥之后,我收到了这条消息

Package containerd.io is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'containerd.io' has no installation candidate

我想这不是最干净的方法,但我和你有同样的问题:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

因为

$(lsb_release -cs)
返回“eoan”(最新ubuntu版本的名称,目前为19.10),它似乎会导致问题。 用“仿生”(Ubuntu18.10)代替它对我来说非常有效,4个月后我仍然没有问题

别忘了打开“/etc/apt/sources.list”并注释掉/删除该行:

deb-src [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable
避免冲突。
(这是您在此过程中输入的第一个命令添加的。)

编辑文件:/etc/apt/sources.list

寻找回购分录:

deb-src [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable
将其更改为:

deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable 

为我解决了问题

docker官方文档建议使用

  $ sudo add-apt-repository \
       "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) \
       stable"
对于Ubuntu 19.10,它似乎还没有包含“containerd.io”包

使用
添加apt repository--Remove
删除先前添加的存储库:

$ sudo add-apt-repository --remove \
       "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) \
       stable"
并添加用于bionic(18.10)Ubuntu发行版的版本:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   bionic \
   stable"
在此之后,更新并安装docker:

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

如果@vavalm的命令也不起作用,请检查您是否安装了ubuntu amd64。您可能安装了Ubuntu版本i384,而不是

是的,这似乎是一个bug。必须对其进行修复才能进行自动更新
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io