今日总结 – centos8 yum install问题解决

centos8使用yum安装软件报错

问题1

问题:/etc/yum.repos.d/CentOS-Epel.repo; Configuration: OptionBinding with id “failovermethod” does not exist

解决:

1. 找到对应的repo文件:/etc/yum.repos.d/CentOS-Epel.repo

2. 注释掉failovermethod=priority这一行,即编辑该repo文件,在对应行添加 “#” 注释

问题2

问题:”Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist”

解决:

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
yum update -y

正文完