调试 apt/安装 Docker - 无法找到软件包 docker-ce

调试 apt/安装 Docker - 无法找到软件包 docker-ce

我已经关注官方说明用于 Docker 安装 - Debian Jessie。

  • 其中/etc/apt/sources.list写道,

    deb [arch=amd64] https://download.docker.com/linux/debian jessie stable

  • apt-get update似乎正确下载了软件包(输出如下)

  • 但是随后,apt-get install docker-ce系统报告“无法找到软件包 docker-ce”。

我该如何调试正在发生的事情?以前从来没有遇到过这种情况。

输出apt-get update

Hit http://packages.dotdeb.org jessie InRelease
Hit http://security.debian.org jessie/updates InRelease
Hit http://packages.dotdeb.org jessie/all Sources
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://packages.dotdeb.org jessie/all i386 Packages
Hit http://security.debian.org jessie/updates/main i386 Packages
Hit http://security.debian.org jessie/updates/contrib i386 Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit https://download.docker.com jessie InRelease
Hit http://security.debian.org jessie/updates/main Translation-en
Ign http://http.debian.net jessie InRelease
Hit https://download.docker.com jessie/stable amd64 Packages
Hit http://http.debian.net jessie-updates InRelease
Hit http://http.debian.net jessie Release.gpg
Get:1 https://download.docker.com jessie/stable Translation-en_US [587 B]
Ign http://packages.dotdeb.org jessie/all Translation-en_US
Ign http://packages.dotdeb.org jessie/all Translation-en
Hit http://http.debian.net jessie-updates/main Sources
Get:2 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie-updates/contrib Sources
Get:3 https://download.docker.com jessie/stable Translation-en_US [587 B]
Get:4 http://http.debian.net jessie-updates/main i386 Packages/DiffIndex [8,884 B]
Get:5 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie-updates/contrib i386 Packages
Hit http://http.debian.net jessie-updates/contrib Translation-en
Get:6 https://download.docker.com jessie/stable Translation-en_US [587 B]
Get:7 http://http.debian.net jessie-updates/main Translation-en/DiffIndex [3,688 B]
Get:8 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie Release
Get:9 https://download.docker.com jessie/stable Translation-en_US [587 B]
Hit http://http.debian.net jessie/main Sources
Get:10 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie/contrib Sources
Hit http://http.debian.net jessie/main i386 Packages
Get:11 https://download.docker.com jessie/stable Translation-en_US [587 B]
Ign https://download.docker.com jessie/stable Translation-en_US
Hit http://http.debian.net jessie/contrib i386 Packages
Hit http://http.debian.net jessie/contrib Translation-en
Hit http://http.debian.net jessie/main Translation-en
Get:12 https://download.docker.com jessie/stable Translation-en [584 B]
Ign https://download.docker.com jessie/stable Translation-en

答案1

docker-ce要在 debian jessie 上安装:

deb [arch=amd64] https://download.docker.com/linux/debian jessie stable添加到您的.后/etc/sources.list(您不需要software-properties-common包或add-apt-repository命令)

安装所需的包:

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl

添加gpg密钥:

curl -fsSl https://download.docker.com/linux/debian/gpg | sudo apt-get key add -

更新并搜索docker-ce包:

sudo apt-get update
apt-cache search docker-ce

然后安装docker-ce包:

sudo apt-get install docker-ce

答案2

针对 linuxmint 用户的特定答案。描述:Linux Mint 20.1 代号:ulyssa

虽然官方发布(ubuntu),有必要的文件和官方docker安装使用 dpkg 的方法。您可以手动下载必要的文件并使用 dpkg 安装


我尝试使用官方脚本进行安装,但是失败了。


免责声明,它可能有意想不到的缺点

可在折断, 做就是了sudo snap install docker

相关内容