Background of the accident: A few days ago, due to project needs, I built the python-mysql module on the server, but it was not installed properly. So I wanted to uninstall and reinstall it, so I searched online for ways to uninstall python. As a result, I accidentally deleted the system's python.......... Now I can only repair it with tears. I searched for methods on the Internet, but they are basically not so detailed. Now I write down this method, hoping to help friends with the same situation as me~ 1: Uninstall Python (in case some students did not uninstall it cleanly) 2. Uninstall yum 3. Verify whether the deletion is complete 4. Install python and yum Find the python rpm package of your system version in the mirror station linked below (mine is a 64-bit system of centos 6.9) Key point: Be sure to choose the file that corresponds to your system version! ! Otherwise, the following error will occur (When the blogger did not see this website at first, he referred to the download file list provided by another blogger and searched and downloaded it directly on the Internet by file name. As a result, the file did not match the system... It took a long time to search on the Internet...) http://vault.centos.org/ Enter the website, select the version corresponding to your system, and enter the OS folder Select the bit number corresponding to the system. For 32-bit, select i386. For 64-bit, select x86_64. Go to the Packages folder After entering, you will see a lot of rpm files 5. Download the following files python-2.6.6-66.el6_8.x86_64.rpmpython-devel-2.6.6-66.el6_8.x86_64.rpmpython-iniparse-0.3.1-2.1.el6.noarch.rpmpython-libs-2.6.6-66.el6_8.x86_64.rpmpython-pycurl-7.19.0-9.el6.x86_64.rpmpython-urlgrabber-3.9.1-11.el6.noarch.rpmrpm-python-4.8.0-55.el6.x86_64.rpmyum-3.2.29-81.el6.centos.noarch.rpmyum-metadata-parser-1.1.2-16.el6.x86_64.rpmyum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm 6. Log in to the server and create a python folder where you like. Here I am in local src 7. Upload the files you just downloaded to the python folder of your server 8. Start installation after uploading If an error similar to the following appears in the middle of the process, this is the dependency relationship between packages (provided that your file and system versions correspond) Pay attention! ! ! The dependency here is not as simple as relying on just one. The problem first occurred when I was installing python-2.6.6-66.el6_8.x86_64.rpm (I forgot to take a screenshot). I searched online and someone said that it depended on python-libs-2.6.6-66.el6_8.x86_64.rpm. Then the blogger still reported this error after trying it. Later, I simply thought of installing them all together, and it really succeeded... (I don't know who has dependencies on whom, so just install them all together. It works after personal testing) 9. Testing The following information indicates that the reinstallation is successful~~~~ Summarize The above is the solution introduced by the editor after uninstalling Python and yum that comes with the CentOs system. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
>>: JavaScript data structure bidirectional linked list
Currently, layui officials have not provided the ...
Add the following code to the CSS style of the el...
Copy code The code is as follows: <input type=...
1. Software Introduction VirtualBox VirtualBox is...
This article shares the manual installation tutor...
First, I will give you the VMware 14 activation c...
In react-router, the jump in the component can be...
var numA = 0.1; var numB = 0.2; alert( numA + num...
Transactional Characteristics 1. Atomicity: After...
The following code introduces Chrome's monito...
In MySQL, you may encounter the problem of case s...
Table of contents Preface think Library directory...
Preface An index is a data structure that sorts o...
Recently, when I was writing a WeChat applet, the...
Demand scenario: The existing PXC environment has...