ubuntu安装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 -fsSLhttps://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

你可能感兴趣的:(ubuntu安装docker-ce提示Package 'docker-ce' has no installation candidate解决的办法)