2021-10-07

访问地址为:http://mirrors.163.com/.help/centos.html

yum install -y wget



首先备份源:

mv /etc/yum.repos.d/CentOS-Base.repo  /etc/yum.repos.d/CentOS-Base.repo.backup




备份之前的源BASE,进入对应目录。

cd /etc/yum.repos.d/

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

mv CentOS7-Base-163.repo CentOS-Base.repo



刷新YUM的缓存状态:

yum clean all

yum makecache



备注:阿里云

http://mirrors.aliyun.com/repo/Centos-7.repo


yum 安装报错

File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
解决:修改文件/usr/bin/yum、/usr/libexec/urlgrabber-ext-down头中相应python为#!/usr/bin/python2.7

打赏

好文章,更需要你的鼓励

本文由 氢设计 创作,除注明转载/出处外,均为本站原创,转载前请务必署名

最后编辑时间为:2021-11-23 10:21:01

本文链接:https://www.h2sheji.com/show-125.html