由于我是用的系统是Centos 5.11以停止更新很多年,故此yum也不能用,找了很多方法,最终yum能稳定的运行在Centos5.11上,下面开始一一讲解步骤:

1:首先更新yum源

地址:http://vault.centos.org/

网站是有各个版本镜像的,所以 通过lsb_release -a查询下,系统版本如图

下面是我的yum源完整版本,下面会说出具体针对系统版本进行修改yum源方法:

vim /etc/yum.repos.d/Centos-Base.repo

# 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.11/os/x86_64/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
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.11/os/x86_64/
gpgcheck=
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.11/os/x86_64/
gpgcheck=
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.11/os/x86_64/
gpgcheck=
enabled=
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.11/os/x86_64/
gpgcheck=
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

注:如果你的版本是5.10(举例说明),打开此网站,http://vault.centos.org,根据上述地址http://vault.centos.org/5.11/os/x86_64/来进行修改,比如系统是5.10的话,是x86_64的,我们可以修改成http://vault.centos.org/5.10/os/x86_64/,修改完成后,浏览器打开输入地址,看看是不是可以显示出以下页面:

如果显示出上述页面,那根据我上面的5.11版本的Centos源把baseurl=http://vault.centos.org/5.11/os/x86_64/ 修改成 baseurl=http://vault.centos.org/5.10/os/x86_64/(是上述文件内容中,所有http://vault.centos.org/5.11/os/x86_64/地址),即可

修改完成后,保存,使用如下命令进行测试

yum clean all

 yum makecache

测试成功后,可用yum进行安装、卸载软件

Centos5.11 使用yum源的更多相关文章

  1. centos6.4搭建基于ftp的yum源让本地局域网服务器使用

    1. 挂载centos6.4 DVD镜像[root@centos64 ~]# mount /dev/cdrom /mnt 2. 安装vsftp软件,启动vsftpd服务,拷贝centos6.4 DVD ...

  2. 阿里云centos5升级yum源为6

    升级后出现Errno -3] Error performing checksum 需要安装 python-hashlib Python 2.4 安装 hashlib 2012年11月13日 14:29 ...

  3. CentOS-5的yum源无法使用问题

    CentOS-5的yum源无法使用问题 [root@37wan ~]# yum -y install gcc Loaded plugins: fastestmirror Determining fas ...

  4. CentOS修改各大yum源(centos5,centos6,centos7)

    备份原配置文件 进入yum源配置目录: cd /etc/yum.repos.d 如果没有先安装wget: sudo yum install wget 修改yum源,就是修改CentOS-Base.re ...

  5. 建立自己的Yum源

    转自http://kicklinux.com/setup-yum-repos-server/ 命令 reposync 可以直接同步yum源 如/etc/yum.repos.d/cloudera-cdh ...

  6. CentOS下建立本地YUM源并自动更新

    1. 尽管有很多的免费镜像提供yum源服务,但是还是有必要建立自己的yum服务器,主要出于以下几点考虑: l 网络速度:访问互联网可能比较慢 l 节省带宽:如果有大量的服务器,架设自己的yum源可以有 ...

  7. redhat7 配置使用centos的yum源

    新安装了redhat7.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Man ...

  8. 利用阿里云提供的镜像快速更换本地的yum源

    打开网页:http://mirrors.aliyun.com/ 从“ 文件列表 ”找到自己的系统: Mirror Last update Help CPAN 2015-07-15 15:36:50   ...

  9. 配置yum源方法,以及失效时的处理

    正常方法如下: step1: 备份原CentOS-Base.repo 文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-B ...

随机推荐

  1. myeclipse10集成Tomcat6时出现错误

    myeclipse配置Tomcat时出现错误:如图 tomcat6目录:如图 在搜集各种资料后,最终得出结论: 在Tomcat目录中新建temp文件夹,问题解决. 亲测好使.

  2. Safair浏览器 时间戳转化兼容性问题。

    chrome 等浏览器支持 yyyy-MM-dd hh:mm:ss 格式,使用 Date.parse()进行转化 safair 浏览器不知道这种格式,需要将格式设置为 yyyy/MM/dd hh:mm ...

  3. 测试,测试开发,QA,QM,QC--------- 测试之路勿跑偏

    测试,测试开发,QA,QM,QC可能是测试行业里的细分角色了,加了不少群学习,看到不同人有对自己不同的角色定位.我也做了这挺长时间的测试,也和大部分测试同胞一样,为了一份好的工作学习各种各样的技术,但 ...

  4. opengl in medical imaging

    医学可视化 http://schorsch.efi.fh-nuernberg.de/roettger/index.php/Lectures/MedicalVisualization http://ww ...

  5. im资源

    https://github.com/oikomi/FishChatServer https://github.com/subrosa-io https://github.com/WhisperSys ...

  6. C# 获取utc时间,以及utc datetime 互相转化

    C# 获取utc时间,以及utc datetime 互相转化   大部分源于http://blog.sina.com.cn/s/blog_4c6e822d0102dsdz.html 刚开始学习一点C# ...

  7. keras中的Flatten和Reshape

    最近在看SSD源码的时候,就一直不理解,在模型构建的时候如果使用Flatten或者是Merge层,那么整个数据的shape就发生了变化,那么还可以对应起来么(可能你不知道我在说什么)?后来不知怎么的, ...

  8. 兼容html5新标签及媒体查询引入插件

    <!-- 以下2个插件是用于在IE8支持HTML5元素和媒体查询的,如果不用可移除 --> <!--[if lt IE 9]> <script src="htt ...

  9. HDU3666 THE MATRIX PROBLEM (差分约束+取对数去系数)(对退出情况存疑)

    You have been given a matrix C N*M, each element E of C N*M is positive and no more than 1000, The p ...

  10. 「NOIP2002」「Codevs1099」 字串变换(BFS

    1099 字串变换 2002年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold   题目描述 Description 已知有两个字串 $A$, ...