RHEL4: Instal Yum & Solve [ Yum Errno256: no more mirrors to try ]

New Blog addr: ozziechen.blogspot.com

After installed the RHEL4, I can't use Yum command to install common tools. Found two steps to install Yum and summary for this:


Step 1: Install Yum
Reference to  http://peiyan.blog.51cto.com/344889/177666
Download Yum
[root@st ~]# wget http://www.parallels.com.cn/downloads/Prima/Tools/yum_forAS4.tar.gz 
[root@st ~]# tar zxvf yum_forAS4.tar.gz
yum_forAS4/
yum_forAS4/CentOS-Base.repo
yum_forAS4/python-elementtree-1.2.6-7.el4.rf.i386.rpm
yum_forAS4/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
yum_forAS4/yum-2.4.2-0.4.el4.rf.noarch.rpm
yum_forAS4/sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum_forAS4/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
[root@st ~]# cd yum_forAS4
[root@st yum_forAS4]# ls CentOS-Base.repo
python-elementtree-1.2.6-7.el4.rf.i386.rpm
python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpmf
sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum-2.4.2-0.4.el4.rf.noarch.rpm
[root@st yum_forAS4]# rpm -ivh *.rpm
warning: python-elementtree-1.2.6-7.el4.rf.i386.rpm: V3 DSA signature: NOKEY,
key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:sqlite                 ########################################### [ 20%]
   2:python-sqlite          ########################################### [ 40%]
   3:python-urlgrabber      ########################################### [ 60%]
   4:python-elementtree     ########################################### [ 80%]
   5:yum                    ########################################### [100%]
[root@st yum_forAS4]# cp CentOS-Base.repo /etc/yum.repos.d/

Import GPG Key
[root@st yum_forAS4]# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4

Step 2: Solve Errno256: no more mirrors to try

After installed Yum, I found I can't use it to update or install tools and cause "Errno 256: no more mirrors to try" with the error file"repomd.xml".

Solution:

Find the file at /etc/yum.repos.d/CentOS-Base.repo, open it and find your mirror address(may ftp/ http etc. ). If your mirror address is: http://mirror.centos.org/centos/4/os/ or sort like this, paste it in your url, you'll find an old address.
Finally, you'll link to http://vault.centos.org/4.X/, and open the file named CentOS-Base.repo. Replace it to your own local file, it'll work.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值