linux系统补丁更新 yum命令

查看yum  repolist
报错http://mirrors.aliyun.com/epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
解决方案
cd /etc/yum.repos.d
vi CentOS-Base.repo :%s/$releasever/7/g #将文件中$releasever全部改成7
sed -i  's#$releasever#7#g' CentOS-Base.repo
yum clean all && yum makecache # 清除和缓存
 
 
阿里云epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
清华镜像源信息:
https://mirrors.tuna.tsinghua.edu.cn/help/epel/

posted @ 2021-01-22 17:08  不忘初心--学  阅读(425)  评论(0编辑  收藏  举报