第一步:
1、删除python
# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps ##强制删除已安装程序及其关联
# whereis python |xargs rm -frv ##删除所有残余文件 ##xargs,允许你对输出执行其他某些命令
# whereis python ##验证删除,返回无结果
2、删除现有的yum
# rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
# whereis yum |xargs rm -frv
# whereis yum ##验证删除,返回无结果
第二步:下载安装包
查看linux红帽子版本cat /etc/redhat-release
根据版本号在下面两个网址找相应的rpm文件进行下载。
1、(可替换网址 Index of /7.7.1908/os/x86_64/Packages)
2、
第三步 安装
rpm -Uvh --replacepkgs *.