镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

起因:

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

  1. # Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
  2. Warning: the "docker" command appears to already exist on this system.
  3. If you already have Docker installed, this script can cause trouble, which is
  4. why we're displaying this warning and provide the opportunity to cancel the
  5. installation.
  6. If you installed the current Docker package using this script and are using it
  7. again to update Docker, you can safely ignore this message.
  8. You may press Ctrl+C now to abort this script.
  9. + sleep 20
  10. + sh -c 'yum install -y -q yum-utils'
  11. 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"
  12. Trying other mirror.
  13. 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"
  14. Trying other mirror.
  15. 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"
  16. Trying other mirror.
  17. 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"
  18. Trying other mirror.

问题解决:

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

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

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

http://mirrors.cloud.aliyuncs.comhttp://mirrors.aliyun.com/centos

最后运行 yum -y update 即可

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

本文转自:https://blog.csdn.net/qq_42543063/article/details/122938018

更多相关文章

  1. 自动批改android模拟器的imei的小程序 和 下载各个版本SDK Tools
  2. 去掉所有Activity界面标题栏、强制横屏竖屏
  3. OpenCV Android解决相机旋转90度及全屏问题
  4. Android(安卓)为【apk】文件签名,增加修改系统时间等权限
  5. Android(安卓)Studio 使用自己编译的framework
  6. The method setOnClickListener(View.OnClickListener)解决办法
  7. 动态修改Android参数信息的方法绕过改机检测
  8. FAQ00366]如何使Android应用程序获取系统权限
  9. Android(安卓)修改状态栏和标题栏颜色

随机推荐

  1. 如何在JavaScript中编写适当的OOP代码?
  2. 覆盖背景:在CSS中带有背景色的url
  3. Node.js嬉皮API测试模块安装
  4. 如何使用jQuery在GET请求中传递参数
  5. JavaScript String对象方法——replace()
  6. HTML5 数据集属性dataset
  7. PhantomJS不支持Javascript国际化API
  8. 浏览器如何处理HTML元素上的无效/未指定
  9. 无法使用深入见解cartodb javascript库
  10. JS之arguments 引发的一个错误