docker安装报错“Package 'docker-ce' has no installation candidate”

内核版本:

Linux guest 5.0.0-15-generic #16-Ubuntu SMP Mon May 6 17:41:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

报错步骤:

按照官方教程https://docs.docker.com/install/linux/docker-ce/ubuntu/
安装,到apt-get install docker-info这步之后,报错如下:

Package docker-ce 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 'docker-ce' has no installation candidate

报错原因:

linux版本号19.04,对应发行版本名disco,此版本的源中没有docker-ce的安装包,所以报错

解决办法:

使用旧版本的docker仓库,我用的是bionic ,使用下面的命令添加源后再安装就Ojbk了:

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

参考链接:https://unix.stackexchange.com/questions/363048/unable-to-locate-package-docker-ce-on-a-64bit-ubuntu

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容