centos8:Could not resolve host: mirrorlist.centos.org


【1】错误消息:

cpp 复制代码
[root@centos211 redis-7.0.15]# yum update                    
CentOS Stream 8 - AppStream                                                                                                                                                      0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'appstream':
  - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
错误:为 repo 'appstream' 下载元数据失败 : Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]

【2】解决方法:

cpp 复制代码
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo
yum clean all
yum makecache

【3】 参考资料

https://support.tuxcare.com/hc/en-us/articles/14841452161820-Could-not-resolve-host-mirrorlist-centos-org

CentOS7 yum安装报错"Could not resolve host: mirrorlist.centos.org;"之解决办法(换源)-腾讯云开发者社区-腾讯云

相关推荐
AI浩1 天前
【Labelme数据操作】LabelMe标注批量复制工具 - 完整教程
运维·服务器·前端
石像鬼₧魂石1 天前
如何配置Fail2Ban的Jail?
linux·学习·ubuntu
sunxunyong1 天前
doris运维命令
java·运维·数据库
Guheyunyi1 天前
智慧消防管理系统如何重塑安全未来
大数据·运维·服务器·人工智能·安全
椰子今天很可爱1 天前
五种I/O模型与多路转接
linux·c语言·c++
Lueeee.1 天前
Linux kernel Makefile 语法
linux
爱吃山竹的大肚肚1 天前
EasyPOI 大数据导出
java·linux·windows
极地星光1 天前
dmesg 工具的核心功能与作用
linux
雾削木1 天前
k230 Pyhton三角形识别
运维·服务器·网络·stm32·智能路由器
福尔摩斯张1 天前
C++核心特性精讲:从C语言痛点出发,掌握现代C++编程精髓(超详细)
java·linux·c语言·数据结构·c++·驱动开发·算法