yum源失效问题 网易 阿里等国内镜像失效
2017-05-12 14:21
1491 查看
yum源失效修正
问题背景:需要搭建git服务器 需要用到yum install ,发现yum源失效 理所当然的去使用以往方案解决step1: 备份原CentOS-Base.repo 文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
step2: wget yum源(网易,阿里等都可以) http://mirrors.163.com/.help/centos.html 选择自己的服务器的版本
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
step3:
yum clean all yum makecache
报错:
打开网址:http://mirrors.163.com/centos/5/addons/x86_x84/repodata/repond.xml
我们发现,网易的镜像都已经转移了,可以在 http://mirrors.163.com/centos/5]看到readme文件,内容如下:
This directory (and version of CentOS) is depreciated. CentOS-5 is now past EOL You can get the last released version of centos 5.11 here: http://vault.centos.org/5.11/ Please NOTE: this is not being maintained for security since moving to Vault. It will have security issues, you should upgrade to a new version instead.
现在的最新镜像是在http://vault.centos.org/这个网址下
所以我们只需要注释掉mirrolist,同时将baseurl的注释打开并将原url替换为http://vault.centos.org即可
我修改完成之后还是报404错误,结果是由于 $releasever 的值是5,而我的版本是5.11,所以我直接将变量 $releasever
全局替换为5.11,至此问题解决了.
可以利用命令
rpm -qi centos-release1
查看$releasever的值
更新:在给网友解决的时候一直报错,查到原因是他有两个yum源,关闭失效的yum源即可,附修改完的yum源截图,如果是6系统还需要修改gpgkey这个后的值为
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-61
版权声明:本文为CyanSkye文章,欢迎审阅,欢迎转载!
相关文章推荐
- CentOS更换国内yum源(aliyun阿里镜像)
- linux 重装 yum 及更换yum源 -- 解决国内各版本 yum 源失效的问题
- CentOS更换国内yum源(aliyun阿里镜像)
- YUM源设置为网易镜像
- CentOS 更新国内网易yum源
- 国内各大互联网公司相关技术博客3.0版 (集合腾讯、阿里、百度、搜狐、新浪、网易、360等共29个)
- Centos修改镜像为国内Yum源
- SlidingMenu+ViewPage+ListView嵌套(类似网易 ) ListView点击事件失效冲突问题解决
- maven使用国内阿里仓库镜像
- 国内各大互联网公司相关技术站点3.0版 (集合腾讯、阿里、百度、搜狐、新浪、网易、360等共28个)
- 国内各大互联网公司相关技术博客3.0版 (集合腾讯、阿里、百度、搜狐、新浪、网易、360等共29个)
- maven镜像 maven 国内镜像 maven 国内镜像 阿里
- 解决android sdk下载难问题的终极解决办法-使用国内镜像
- centos6.5适用的国内yum源:网易、搜狐
- Linux系统中yum源更新为国内镜像地址
- npm版本更新问题(国内镜像问题)
- rubygem 国内镜像 解决gem install rails 连接超时的问题
- 配置镜像yum源--解决RHN not available的问题
- rubygem 国内镜像 解决gem install rails 连接超时的问题
- Linux(CentOS6.5)修改默认yum源为国内的阿里云、网易yum源