Re-install python and yum with rpm, and re-install pythonyum with rpm.
The yum cannot be used for the python upgraded the other day. The prompt "No module named yum" is displayed. Then, I searched for it and said that I didn't think much about Reinstalling python and yum, I just followed the tutorials and uninstalled them, but I couldn't install them. They all followed the tutorials. As a result, there is no omnipotent tutorial in the world, and everyone may have different situations. therefore, we set foot on the path of python and yum reinstallation.
Uninstall
The uninstallation is based on the online method.
Rpm-qa | grep python | xargs rpm-ev -- allmatches -- nodeps # force Delete installed programs and their associated whereis python | xargs rm-frv # delete all residual files # xargs, allow you to execute some other command whereis python # verify the deletion of the output, and return the result of no rpm-qa | grep yum | xargs rpm-ev -- allmatches -- nodepswhereis yum | xargs rm-frwhereis yum
Install
I also follow the tutorial to install, use wget to download various installation packages in the http://mirrors.163.com/centos/6/ OS /x86_64/Packages
But the installation failed, prompt all kinds of dependent library problems, then, I tried to install one by one, but also fell into an endless loop, install python-2.6.6-66.el6_8 prompts need python-libs-2.6.6-66.el6_8, then I install python-libs-2.6.6-66.el6_8 first, again prompt need python-2.6.6-66.el6_8, you play to bask in it!
Finally, get inspiration from a blog
I tried to install python-2.6.6-66.el6_8 and python-libs-2.6.6-66.el6_8 at the same time.
Next, install other installation packages. If you encounter dependency problems, first install the dependent package, and then install yum, directly run rpm-ivh yum-*. rpm.
Finally, it's done!
Test
Test