ubuntu16.04 安装docker 报错unable to resolve host address

版权声明: https://blog.csdn.net/qq_37105358/article/details/84190740

在ubuntu16.04安装docker的时候

设置apt仓库地址的时候执行以下命令

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

直接报错: 

unable to resolve host [主机名]

此时不是因为网上的一些什么该host文件啥的

而是国外镜像不同,直接修改镜像地址就可以了  修改命令为:

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

这时候用的是阿里云的镜像,接着就像网上说的那样走就ojbk了  

猜你喜欢

转载自blog.csdn.net/qq_37105358/article/details/84190740