起因:

在使用curl 命令进行自动化安装Docker的执行脚本过程中报错如下

# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
Warning: the "docker" command appears to already exist on this system.
 
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
 
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
 
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c 'yum install -y -q yum-utils'
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.

问题解决:

可以按照如下步骤进行修改即可

进入 cd /etc/yum.repos.d/ 该目录下

修改文件 CentOS-Base.repo 和 epel.repo 中所有

最后运行 yum -y update 即可

修改后 重新执行上面curl命令

作者:|萌褚|,原文链接: http://www.imooc.com/article/325865

文章推荐

无限分解流 - -Fork/Join框架

HA高可用集群部署

springboot~国际化Locale正确的姿势

Nuxt3.0中使用EChart可视化图表?

线上诊断神器-arthas基本应用

快来玩AI画图!StableDiffusion模型搭建与使用入门~

node的readDirFiles、readFileSync 的一些实操脚本

Linux进程与线程的基本概念及区别

一文通吃:从 ZooKeeper 一致性,Leader选举讲到 ZAB

给小白的 PostgreSQL 容器化部署教程(上)

分布式任务调度ScheduleMaster

CXP 协议中upconnection 与downconnection的说明及其区别