整个思路是这样的,没有了Python2.7,我就需先把Linux服务器依赖的Python2.7的包重新安装上,再看有没有其他问题,如果没有,好万事大吉,如果有,再看提示,开始干活....二.检查是否删除彻底
2.1.检查Python2.7是否卸载干净了
#卸载python
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps...#删除残留文件
whereis yum |xargs rm -frv
#验证删除完成,返回无结果
whereis yum
三.下载安装恢复
3.1.查看linux版本
安装Python2.7的依赖包...,就要找到Linux的版本号,经查我的版本号是:
#命令
cat /etc/redhat-release
#版本号
CentOS Linux release 7.8.2003
3.2.在官方网站找到对应的包...mirrors.163.com/centos/7.8.2003/os/x86_64/Packages/python-devel-2.7.5-88.el7.x86_64.rpm
rpm -ivh --nodeps