as4 装yum

 wget http://www.haoxm.net/tools/yum_forAS4.tar.gz
tar xfz yum_forAS4.tar.gz 
cd yum_forAS4
rpm -ivh *.rpm
#如果以安装失败,可 以尝试 rpm -Uvh *.rpm
mv /etc/yum.repos.d/* /tmp/
cp CentOS-Base.repo /etc/yum.repos.d/
rpm --import http://www.haoxm.net/tools/RPM-GPG-KEY-CentOS-4

 

 

===清空原来 /etc/yum.repo.d/rhel-debuginfo.repo,将rhel-debuginfo.repo,内容修改为如下内容===

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# 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://centos.ustc.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/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://centos.ustc.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/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://centos.ustc.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$&arch=$basearch&repo=centosplus
baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

附:REDHAT 9 yum安装

刚装的Redhat9,没有选择任何安装包。
在安装YUM时附属包出错:

[root@net root]# rpm -q yum
package yum is not installed
[root@net root]# rpm -ivh yum-2.0.4-1.
yum-2.0.4-1.noarch.rpm    yum-2.0.4-1.rh.fr.i386.rpm
[root@net root]# rpm -ivh yum-2.0.4-1.rh.fr.i386.rpm
warning: yum-2.0.4-1.rh.fr.i386.rpm: V3 DSA signature: NOKEY, key ID e42d547b
error: Failed dependencies:
       libxml2-python is needed by yum-2.0.4-1.rh.fr
[root@net root]# rpm -ivh yum-2.0.4-1.noarch.rpm
error: Failed dependencies:
       libxml2-python is needed by yum-2.0.4-1
解决办法:
先安装libxml2-python即可解决。
rpm -ivh libxml2-python-2.6.8-1.i386.rh9.rpm
rpm -ivh yum-2.0.4-1.rh.fr.i386.rpm
注意:rpm -ivh yum-2.0.4-1.rh.fr.i386.rpm --nodeps --force可以安装成功,但是解决不了yum的问题,yum install gcc会报

你可能感兴趣的:(职场,yum,休闲)