关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

关于centos6系统无法更新yum的解决办法

发布时间:2023-05-10 10:55:40
1491984010112764.jpg

image.png



http://mirrors.hust.edu.cn/centos/6.5/os/x86_64/Packages/dhcp-common-4.1.1-38.P1 .el6.centos.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.


今天使用centos6.5 64 系统安装系统服务提示一直无法获取yum更新

解决办法如下:

[1] 首先备份/etc/yum.repos.d/CentOS-Base.repo

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


[2] 进入yum源配置文件所在文件夹

  1. cd /etc/yum.repos.d/  


[3] 下载163或者阿里云的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份)

163:

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


centos5:

  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo  


centos6:

  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo  


centos7:

  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo  



[4] 运行yum makecache生成缓存

  1. yum makecache  


[5] 更新系统

  1. yum -y update  



/template/Home/8a/PC/Static