【问题标题】:Install docker on debian stretch在 debian 上安装 docker
【发布时间】:2021-12-19 19:50:31
【问题描述】:

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

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 密钥,所以根据教程,这不应该发生。我的问题是 - 我做错了什么?

【问题讨论】:

    标签: linux docker debian devops


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-08
      • 1970-01-01
      • 2017-05-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-27
      • 2020-08-25
      相关资源
      最近更新 更多