简体   繁体   中英

Install docker on debian stretch

I was following the guidelines in docker official tutorial https://docs.docker.com/engine/install/ubuntu/ , point Install using the repository but after adding new apt sources entry to /etc/apt/sources.list.d/docker.list

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

and trying to call apt-get update I got this: 在此处输入图片说明

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.

I added Docker's official GPG key, so according to the tutorial this should not happen. My question is - what am I doing wrong?

You have to install apt-transport-https and ca-certificates packages first.

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

If this does not help, you have to fix your /etc/apt/sources.list.d/ manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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