博主信息
博文 291
粉丝 0
评论 0
访问量 458217
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
记录:yum Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error解决
原创
2075人浏览过

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

起因:

在使用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

本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学