RHEL6中
1、卸载自身yum
2、下载centos6相关包
#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
3、安装
# rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
# rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
4、复制centos6中的repo到RHEL6
rhel6# vi /etc/yum.repos.d/CentOS-Base.repo
编辑:
5、导入centos6的key
rhel6#rpm --import /tmp/RPM-GPG-KEY-CentOS-6
6、使用
# yum list
没有报错