centos8使用yum安装程序出现报错
- 人工智能
- 2025-08-29 21:51:01

在执行yum指令出现源更新不了Could not resolve host: mirrorlist.centos.org; Unknown error问题 yum -y update
结果
Errors during downloading metadata for repository 'appstream': - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org] Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org] 问题排查: 1、先确认一下是否网络问题,执行指令 ping .baidu网络没有问题的结果
如果有问题就解决一下网络问题
2、yum的源问题,由于官方不更新的原因导致使用不了先到/etc/yum.repos.d目录,把有问题的东西删除 再从阿里云仓库找到相应
http://mirrors.aliyun /repo直接可以下载
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun /repo/Centos-8.repo再更新yum
yum clean all yum makecache yum -y update就解决问题了,祝你好运。。。
centos8使用yum安装程序出现报错由讯客互联人工智能栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“centos8使用yum安装程序出现报错”