查看
rpm -qa |grep yum
卸载
rpm -aq|grep yum|xargs rpm -e --nodeps
下载 RPM 包
wget http://ftp.iij.ad.jp/pub/linux/centos-vault/6.8/cr/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://ftp.iij.ad.jp/pub/linux/centos-vault/6.8/cr/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
wget http://ftp.iij.ad.jp/pub/linux/centos-vault/6.7/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://ftp.iij.ad.jp/pub/linux/centos-vault/6.7/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://ftp.iij.ad.jp/pub/linux/centos-vault/6.7/os/x86_64/Packages/python-urlgrabber-3.9.1-9.el6.noarch.rpm
安装
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
安装成功后,会有如下类似输出:
Preparing... ########################################### [100%]
package python-iniparse-0.3.1-2.1.el6.noarch is already installed
============================
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-plugin-fastestmirro########################################### [ 67%]
3:yum ########################################### [100%]
报错
上面下载安装包的时候多下载了一个python-urlgrabber
,我这里的系统是已经安装了的。
[root@localhost yum]# rpm -qa|grep python-urlgrabber
python-urlgrabber-3.9.1-11.el6.noarch
如果报错说缺少这个包,或者是提示版本太旧,则重新装上我们刚才下载的那个即可。
# 卸载
rpm -qa|grep python-urlgrabber | rpm -e
# 安装
rpm -ivh python-urlgrabber-3.9.1-9.el6.noarch.rpm
我先前直接安装,系统就提示我版本冲突了。
Preparing... ########################################### [100%]
package python-urlgrabber-3.9.1-11.el6.noarch (which is newer than python-urlgrabber-3.9.1-9.el6.noarch) is already installed
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.py from install of python-urlgrabber-3.9.1-9.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-11.el6.noarch
更新
yum clean all && yum makecache
评论区