yum update 之后centos 8 failovermethod和appstream报错 | server 运维论坛-江南app体育官方入口
linux版本:
原因:执行完yum update
系统更新到centos 8 ,出现如下错误
- appstream错误
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]
- failovermethod错误
invalid configuration value: failovermethod=priority in /etc/yum.repos.d/centos-epel.repo; configuration: optionbinding with id "failovermethod" does not exist repository epel is listed more than once in the configuration
江南app体育官方入口的解决方案:
- failovermethod处理
需要在/etc/yum.repos.d/centos-epel.repo
删掉failovermethod
选项
failovermethod=priority
- 执行:
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/centos-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/centos-*
处理完再去执行我们自己的命令yum -y install systat
最后就正常了
本作品采用《cc 协议》,转载必须注明作者和本文链接
每天一点小知识,到那都是大佬,哈哈