好好的为什么要修复Yum?事情经过:
测试机上的Python3.7不能正常使用Sqlite3,尝试了各种办法,环境变量、重编译…都不行,被逼无奈想着直接卸载掉Python3整个环境,清理干净,结果卸载时把Python3打成了Python,看着下面输出的路径是python,一下就回过神了…
算了,删就删了,索性清理干净:
[root@localhost prepapp]# whereis python #查看下卸载净了没,没有就下一条
[root@localhost prepapp]# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps #删除已安装的程序和一些关联
[root@localhost prepapp]# whereis python |xargs rm -frv # 清理干净
[root@localhost prepapp]# rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps #删除掉坏的yum
[root@localhost prepapp]# whereis yum |xargs rm -frv #清理干净
然后准备如下依赖包:
libxml2-python.rpm
python-2.7.5-58.el7.x86_64.rpm
python-backports-1.0-8.el7.x86_64.rpm
python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch.rpm
python-chardet-2.2.1-1.el7_1.noarch.rpm
python-devel-2.7