为了验证上篇博客中rpm = 4.8.0-55.el6 is needed by rpm-python-4.8.0-55.el6.x这个错误提示是不是rpm版本引起的做了个测试
[root@mylinux66 ~]# rpm -qa | grep rpm
rpm-libs-4.8.0-37.el6.x86_64
rpm-python-4.8.0-55.el6.x86_64
rpm-4.8.0-37.el6.x86_64
查询为37版本,因为已经用rpm -e rpm-python-4.8.0-55.el6.x86_64.rpm --nodeps这个方法进行了强制安装所以显示已经安装成功,并且yum源已经可以正常使用,用yum升级rpm
[root@mylinux66 anz]# yum list updates | grep rpm
rpm.x86_64 4.8.0-55.el6 base
rpm-libs.x86_64 4.8.0-55.el6 base
[root@mylinux66 anz]# yum update rpm*
升级成功后,查询rpm版本
[root@mylinux66 anz]# yum info rpm
Plugin "product-id" can't be imported
Plugin "subscription-manager" can't be imported
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
已安装的软件包
Name : rpm
Arch : x86_64
Version : 4.8.0
Release : 55.el6
Size : 1.9 M
Repo : installed
From repo : /rpm-4.8.0-55.el6.x86_64
Summary : The RPM package management system
URL : http://www.rpm.org/
License : GPLv2+
Description : The RPM Package Manager (RPM) is a powerful command line driven
: package management system capable of installing, uninstalling,
: verifying, querying, and updating software packages. Each software
: package consists of an archive of files along with information about
: the package like its version, a description, etc.
卸载并查询 rpm-python-4.8.0-55.el6.x86_64
[root@mylinux66 anz]# rpm -e rpm-python-4.8.0-55.el6.x86_64 --nodeps
[root@mylinux66 anz]# rpm -qa | grep python
python-iniparse-0.3.1-2.1.el6.noarch
python-2.6.6-66.el6_8.x86_64
python-urlgrabber-3.9.1-11.el6.noarch
python-libs-2.6.6-66.el6_8.x86_64
python-pycurl-7.19.0-9.el6.x86_64
最后安装 rpm-python-4.8.0-55.el6.x86_64包
[root@mylinux66 anz]# rpm -ivh rpm-python-4.8.0-55.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:rpm-python ########################################### [100%]
[root@mylinux66 anz]# rpm -qa | grep python
python-iniparse-0.3.1-2.1.el6.noarch
python-2.6.6-66.el6_8.x86_64
python-urlgrabber-3.9.1-11.el6.noarch
python-libs-2.6.6-66.el6_8.x86_64
python-pycurl-7.19.0-9.el6.x86_64
rpm-python-4.8.0-55.el6.x86_64
最后安装成功