Yum update 之后CentOS 8 failovermethod和appstream报错

LINUX版本:

Yum update 之后CentOS 8 failovermethod和appstream报错问题

原因:执行完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

解决方案:

  1. failovermethod处理
    需要在/etc/yum.repos.d/CentOS-Epel.repo删掉failovermethod选项

failovermethod=priority
Yum update 之后CentOS 8 failovermethod和appstream报错问题

  1. 执行:
  • 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

Yum update 之后CentOS 8 failovermethod和appstream报错问题

最后就正常了

本作品采用《CC 协议》,转载必须注明作者和本文链接
每天一点小知识,到那都是大佬,哈哈
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!