-3

我正在尝试在我的 ubuntu 17.10 上安装 Docker,所以我按照链接上的说明进行操作: https ://docs.docker.com/install/linux/docker-ce/ubuntu/

 sudo apt-get update

表明在此处输入图像描述

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

节目 在此处输入图像描述

请问我该怎么办?

4

2 回答 2

1

我在 Ubuntu VM 上安装 Docker 时遇到了类似的问题。这对我有用。

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce

最后sudo systemctl status docker检查它是否安装正确。

于 2019-10-21T15:14:03.157 回答
0

将 /usrLib/apt/methods 中的 https 目录符号链接到 http 似乎可行:

$ cd /usr/lib/apt/methods
$ ln -s http https

确保在 apt-get install apt-transport-https 之后没有配置任何带有 https:// 的源,它实际上会用正确的文件覆盖符号链接。

之后运行 docker 安装脚本:

# remove old packages
$ sudo apt-get remove docker docker-engine docker.io containerd runc

# update
$ sudo apt-get update

# install dependencies
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

# fetch rep
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# add stable repo
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

# update
$ sudo apt-get update

# install
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

这应该有效(来自官方文档

于 2019-10-21T15:11:06.110 回答