背景
Centos官方镜像使用yum安装软件经常网络不可达,比如报错:
[root@localhost egypt-1.10]# yum install cpan
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]
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-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
将yum镜像源换成阿里云比较方便,本文简单记录更换方式。具体可参考:https://developer.aliyun.com/mirror/centos
实操
备份原有以及下载新的
mv /etc

最低0.47元/天 解锁文章
1233

被折叠的 条评论
为什么被折叠?



