由于redhet自带的yum需要收费,所以卸载原先的自带yum工具,linux版本为centos6.3
查看已安装的yum包
rpm -qa|grep yum
卸载软件包
rpm -e --nodeps yum-*
下载地址
http://mirrors.163.com/centos/6/os/x86_64/Packages/
下载:
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
安装yum包
rpm -ivh yum-*
如果返现python错误如下:
Python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarch
发现错误,python-urlgrabber版本必须大于等于3.9.1-10
查看系统的python信息
rpm -qa|grep python
发现python-urlgrabber-3.9.1-9.el6.noarch 版本低于3.9.1-10
卸载:python-urlgrabber-3.9.1-9.el6.noarch
rpm -e python-urlgrabber-3.9.1-9.el6.noarch
下载
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
安装python-urlgrabber
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
再次安装yum
rpm -ivh --force yum-*
更新yum源(针对centos6的系统)
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
sed -i 's#$releasever#6#g' ./CentOS6-Base-163.repo
yum clean all
yum makecache
网友评论