1.安装docker 过程中报错
Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to us.archive.ubuntu.com:80 (91.189.91.38). - connect (111: Connection refused) Could not connect to us.archive.ubuntu.com:80 (91.189.91.39). - connect (111: Connection refused)
2.先设置代理
# 先设置代理
export http_proxy=http://<proxy>:<port>
export https_proxy=http://<proxy>:<port>
# 执行命令 `sudo add-apt-repository` 的时候加上 `-E`
sudo -E add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
3.如下设置:
export http_proxy=http://us.archive.ubuntu.com:80
export https_proxy=http://us.archive.ubuntu.com:80
4.再次执行sudo apt install apt-transport-https ca-certificates curl software-properties-common成功