先把原有的python和yum删干净
1、删除现有Python
[root@Xxxx ~]# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps ##强制删除已安装程序及其关联
[root@Xxxx~]# whereis python |xargs rm -frv ##删除所有残余文件 ##xargs,允许你对输出执行其他某些命令
[root@Xxxx~]# whereis python ##验证删除,返回无结果
2、删除现有的yum
[root@Xxxx ~]# rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
[root@Xxxx~]# whereis yum |xargs rm -frv