Re-install python and yum with rpm, and re-install pythonyum with rpm.

Source: Internet
Author: User

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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.