记录:yum Could not resolve host: mirrors.cloud.aliyuncs.com
2022/6/5 3:20:08
本文主要是介绍记录:yum Could not resolve host: mirrors.cloud.aliyuncs.com,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
起因:
在使用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 中所有
http://mirrors.cloud.aliyuncs.com 为 http://mirrors.aliyun.com/centos
最后运行 yum -y update 即可
修改后 重新执行上面curl命令
这篇关于记录:yum Could not resolve host: mirrors.cloud.aliyuncs.com的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-15快速提升职场效率:从整理任务清单开始
- 2024-11-15低代码开发学习:新手入门指南
- 2024-11-15数字能量的职场释放:实物量法诠释效率的多维度
- 2024-11-15Postman学习:新手入门全面指南
- 2024-11-15低代码开发入门:初学者必看指南
- 2024-11-15低代码入门:新手必读指南
- 2024-11-15低代码应用入门:新手必读教程
- 2024-11-15Postman入门:新手必备教程
- 2024-11-15Postman教程:新手快速上手指南
- 2024-11-14企业协同软件:现代化管理的新选择