Centos 7 mistakenly deleted Yum, how to remedy? ? ?

1. Check the version number of centos

cat /etc/redhat-release

2. Ali cloud into the source station address: http: //mirrors.aliyun.com/ find the corresponding version number

 

3. download the appropriate package yum

wget  https://mirrors.aliyun.com/centos/7.7.1908/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://mirrors.aliyun.com/centos/7.7.1908/os/x86_64/Packages/yum-3.4.3-163.el7.centos.noarch.rpm
wget https://mirrors.aliyun.com/centos/7.7.1908/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm

4. Run the following commands

rpm -ivh  yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -ivh yum-3.4.3-163.el7.centos.noarch.rpm  yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm

5. Test

 

 

Guess you like

Origin www.cnblogs.com/wqzn/p/11839566.html