Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of deleting the version of Python from the system by Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "the method of deleting the version of Python in the Linux system". In the daily operation, I believe that many people have doubts about the method of deleting the version of Python in the system by Linux. The editor has consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubts of "the method of deleting the version of Python in the Linux system". Next, please follow the editor to study!

1. Uninstall python (prevent clean uninstall)

Rpm-qa | grep python | xargs rpm-ev-- allmatches-- nodeps # forcibly delete installed programs and their associations

Whereis python | xargs rm-frv # Delete all remaining files # xargs, allowing you to execute certain other commands on the output

two。 Uninstall yum

Rpm-qa | grep yum | xargs rpm-ev-- allmatches-- nodeps

Rm-rf / etc/yum.repos.d/*

Whereis yum | xargs rm-frv

3. Verify that the deletion is clean

Whereis python # verifies deletion. No result should be returned.

Whereis yum

4. Install python and yum

Software download address (my system is centos 7.5.1804)

Check the linux system version: cat / etc/redhat-release

Http://vault.centos.org/7.5.1804/os/x86_64/packages/

The required files are as follows: (just download the corresponding version of your own system)

Wget http://vault.centos.org/7.5.1804/os/x86_64/packages/lvm2-python-libs-2.02.177-4.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-libs -2.7.5-68.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-ipaddress-1.0.16-2.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-backports-1.0-8.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/ Packages/python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-2.7.5-68.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-iniparse-0.4-9.el7.noarch.rpmwget http://vault.centos.org/7.5 .1804 / os/x86_64/packages/python-pycurl-7.19.0-19.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-urlgrabber-3.10-8.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-setuptools-0.9.8-7.el7.noarch.rpmwget http://vault.centos.org/ 7.5.1804/os/x86_64/packages/python-kitchen-1.1.1-5.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/python-chardet-2.2.1-1.el7_1.noarch.rpm

Wget http://vault.centos.org/7.5.1804/os/x86_64/packages/rpm-python-4.11.3-32.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/yum-utils-1.1.31-45.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/yum-3.4.3-158.el7 .centos.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/yum-plugin-aliases-1.1.31-45.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/yum- Plugin-protectbase-1.1.31-45.el7.noarch.rpmwget http://vault.centos.org/7.5.1804/os/x86_64/packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm

5. Upload and install

I am here or wget directly to a directory after taking the link, and then go directly to the directory to execute the command.

Rpm- uvh-replacepkgs lvm2-python-libs*.rpm-nodeps-force rpm- uvh-replacepkgs libxml2-python*.rpm-nodeps-force rpm- uvh-replacepkgs python*.rpm-nodeps-force rpm- uvh-replacepkgs rpm-python*.rpm yum*.rpm nodeps force

Execute after successful installation

Yum

Python

At this point, the study on "the method of Linux deleting the version of Python that comes with the system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report