繁体   English   中英

在 debian 上安装 docker

[英]Install docker on debian stretch

我遵循 docker 官方教程https://docs.docker.com/engine/install/ubuntu/ 中的指导方针,指向Install using the repository但在向 /etc/apt/sources.list.d/ 添加新的 apt 源条目后docker.list

deb [arch=amd64] signed=by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian stretch stable

并尝试调用 apt-get update 我得到了这个: 在此处输入图片说明

root@aruba-cloud:~/mgr-project# apt-get update
Ign:1 http://ftp.uk.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org/debian-security stretch/updates InRelease
Hit:3 http://ftp.uk.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.uk.debian.org/debian stretch Release
Reading package lists... Done                      
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch https://download.docker.com/linux/debian/dists/stretch/InRelease  
E: Some index files failed to download. They have been ignored, or old ones used instead.

我添加了 Docker 的官方 GPG 密钥,所以根据教程这不应该发生。 我的问题是 - 我做错了什么?

您必须先安装apt-transport-httpsca-certificates包。

apt-get install apt-transport-https ca-certificates

如果这没有帮助,您必须手动修复您的/etc/apt/sources.list.d/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM