CentOS 5 yum源无法使用
在新装的CentOS 5.7系统中,由于CentOS 5.7版本比较旧,yum源无法使用。
尝试多种方法,最终从http://blog.csdn.net/zhuix7788/article/details/73369209得到了解决方法。
vi /etc/yum.repos.d/CentOS-Base.repo更新文件内容,内容替换。
#<span style="background-color: rgb(255, 102, 102);"><strong><span style="color:#ff6666;">
# 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
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://vault.centos.org/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://vault.centos.org/5.11/extras/$basearch/
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
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://vault.centos.org/5.11/centosplus/$basearch/
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
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
baseurl=http://vault.centos.org/5.11/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5</span></strong></span>
最后:yum clean all
最新文章
- 小小border用处多
- 做小图标还用sprite图?你out了!史上最简单易懂iconfont使用教程
- 酷酷的jQuery classicAccordion 手风琴
- Just a Hook(HDU1698 线段树的简单应用)
- ASP.NET内置对象详解
- 解决 “无法安装 Visual Studio 2010 Service Pack 1,因为此计算机的状态不支持”
- jQuery 的插件 dataTables
- 【NHibernate】HQL入门
- Java IntelliJ IDEA 不能显示项目里的文件结构解决办法
- 一些小bug
- 蓝桥网试题 java 算法训练 区间k大数查询
- app与后台交互之间的几种安全认证机制
- vijos1760题解
- DateTable转化为泛型集合
- Spring Boot Document Part II(上)
- n对n
- jedis &; common pool
- oracle 11g RAC 的基本操作(一)------启动与关闭
- windows通过node环境搭建安装npm,cnpm,vue-cli
- 第五周学习总结-HTML5