解决centOS 8 failovermethod 和 appstream报错问题

1,386 阅读1分钟

yum update 之后

系统变成了centOS 8 image.png

yum安装mysql时报了两个错,

  1. Invalid configuration value: failovermethod=priority
  2. Failed to download metadata for repo 'appstream'

先看第一个错误

$ yum install mysql-server Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist...

参考这篇 bugzilla.redhat.com/show_bug.cg… image.png

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

image.png

image.png

把红框删掉,ok

再看第二个错误

image.png

按照如下命令行操作执行

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-*

我再安装mysql

image.png

成功了!