Linux下yum install报错Error: Package:

重新下载对应centos-x.repo解决:

cd /etc/yum.repos.d/
CentOS-Base.repo CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i  's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo
yum repolist 

你可能感兴趣的:(linux,linux,yum)