ubuntu16.4版本安装docker-ce提示Package 'docker-ce' has no installation candidate解决的办法

前提是先执行apt-get update  apt-get upgrade

如果还出现这个问题 依次执行下面的步骤:

#添加docker源、
sudo echo "deb https://download.docker.com/linux/ubuntu zesty edge" > /etc/apt/sources.list.d/docker.list

#支持解析https
apt-get install -y apt-transport-https ca-certificates curl software-properties-common

#添加GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

#设置存储库位置
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

#执行安装命令
apt-get install -y docker-ce

如果还是不行 就再跑一次update然后执行安装命令。我的环境就是这么装起来的。






猜你喜欢

转载自www.cnblogs.com/coding88/p/12799729.html