centos7用yum安装httpd出错显示repo 'AppStream'下载元数据失败怎么解决?

如题所述

错误:为 repo ‘base’ 下载元数据失败
解决方法:
大家可以按照如下流程修改源
1.备份现有源
mv /etc/yum.repos.d /etc/yum.repos.d.backup
2.设置新的yum目录
mkdir /etc/yum.repos.d
3.安装wget(我没安装,也没事,可能是我以前安装过)
yum install -y wget
4.就是坑了我一晚上的下载配置(大家一定要区分自己的系统版本,不然肯定不通过)
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
CentOS 8
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
5.清除文件并重建元数据缓存
yum clean all
yum makecache
6.最后更新软件包,这一步要下载安扎ung或升级一百多个软件包,比较费时间,大概三五分钟吧!
yum update -y
原文链接:https://blog.csdn.net/VictorIs/article/details/104400362/
温馨提示:答案为网友推荐,仅供参考