问题_解决CentOS 5.5 yum源不能用的问题
2018-03-30 10:27
337 查看
问题描述
解决方案
国内的几个yum镜像源
YumRepo Error: All mirror URLs are not using ftp, http[s] or file
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons.
Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfi
试了网上解决方案,我的问题均未解决。最后自己试出来了,先说明下大概情况:
1.最新版的CentOS系统是7.4.1708,如图
2.国内的各大镜像站只有最新版本目录有内容,其他版本目录下仅有readme文件
3.各大镜像站下载的
1.通过
2.根据查询信息,将
3.保存文件后,运行
4.执行
http://centos.ustc.edu.cn,中国科技大学,服务器位于合肥。 南方用户推荐。
http://mirrors.sohu.com/,sohu的开源镜像服务器,服务器位于山东省联通。 速度飞快,全国用户推荐,经常用FireFox下载CD镜像。
http://mirrors.163.com/centos,网易的开源服务器镜像 速度也不错,全国用户推荐. 下载CentOS-Base-163.repo, 放入/etc/yum.repos.d/
解决方案
国内的几个yum镜像源
问题描述
在yum check-update的时候,总是提示错误。按照网上的方法做处理,结果提示各种错误,大致如下:
YumRepo Error: All mirror URLs are not using ftp, http[s] or file
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons.
Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfi
试了网上解决方案,我的问题均未解决。最后自己试出来了,先说明下大概情况:
1.最新版的CentOS系统是7.4.1708,如图
2.国内的各大镜像站只有最新版本目录有内容,其他版本目录下仅有readme文件
3.各大镜像站下载的
CentOS-Base.repo文件,放到
/etc/yum.repos.d/下都用不了
解决方案
在readme文件中发现
http://vault.centos.org/网站是有各个版本镜像的,所以
1.通过
lsb_release -a查询下,系统版本如图
2.根据查询信息,将
/etc/yum.repos.d/CentOS-Base.repo中baseurl路径做调整,文件内容如下:
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base baseurl=http://vault.centos.org/5.5/os/i386/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS-$releasever - Updates baseurl=http://vault.centos.org/5.5/updates/i386/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://vault.centos.org/5.5/addons/i386/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://vault.centos.org/5.5/extras/i386/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://vault.centos.org/5.5/centosplus/i386/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib baseurl=http://vault.centos.org/5.5/contrib/i386/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
3.保存文件后,运行
yum clean all
4.执行
yum check-update测试下,ok
国内的几个yum镜像源
http://ftp.sjtu.edu.cn/centos/,上海交大,但服务器位于北京,中国教育网网络中心,我看像是朝阳区那边的IP,以前在那边上过 班,下载速度高达十M。 北方用户与教育网用户推荐,速度飞快。http://centos.ustc.edu.cn,中国科技大学,服务器位于合肥。 南方用户推荐。
http://mirrors.sohu.com/,sohu的开源镜像服务器,服务器位于山东省联通。 速度飞快,全国用户推荐,经常用FireFox下载CD镜像。
http://mirrors.163.com/centos,网易的开源服务器镜像 速度也不错,全国用户推荐. 下载CentOS-Base-163.repo, 放入/etc/yum.repos.d/
相关文章推荐
- CentOS5.5 NFS不能启动问题解决
- CentOS5.5 NFS不能启动问题解决
- 在centos6.4上安装ganglia3.4.0过程中遇到的操作系统不能启动问题的解决
- 解决CentOS系统下浏览器不能在线听歌的问题
- 解决VMware里面CentOS不能联网的问题
- 解决CentOS 7不能上网,访问Centos7服务器请求超时问题
- 解决centos 5.5 yum 源比较旧的问题
- Centos 6.4 python 2.6 升级到 2.7一起的MySQLdb不能使用的解决问题
- CentOS 5.5无法识别Atheros AR8151网卡问题解决
- 解决在CentOS 5.5 yum源下载慢的办法即修改yum源
- 解决在CentOS 5.5 yum源下载慢的办法
- 解决centos5.6下面命令不能使用的问题
- Win7下安装的Qt 5.5 不能调试,问题解决
- Centos能上内网不能上外网,问题解决!
- 解决vbox安装centos不能上网问题
- CentOS 5.5无法识别Atheros AR8151网卡问题解决
- MySQL 5.5版本解决中文乱码问题时my.ini内[mysqld]项中不能再写default-character-set=utf8
- 解决centos系统自定义在rc.local中的脚本不能执行问题小记
- 解决centos7下 客户端不能连接redis 报错 及 后台运行的问题
- 解决redhat自带yum不能用的问题 (借用CentOS)