centos8 yum install问题解决

2022-10-31 17:58:30 浏览数 (1)

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"

解决:

代码语言:javascript复制
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
yum update -y

0 人点赞