1. 程式人生 > >vm redhat yum 解除安裝重灌centerOS的yum

vm redhat yum 解除安裝重灌centerOS的yum

Red Hat Enterprise Linux 需要註冊,收費才可以使用yum進行自由下載

This system is not registered to Red Hat Subscription Management.You can use subscription-manager to register.

刪除原有的yum

rpm -aq | grep yum | xargs rpm -e --nodeps

檢視主機yum的安裝情況

rpm -qa |grep yum

下載centerOS對應的yum 進行安裝

http://mirrors.163.com/centos/6/os/x86_64/Packages/

rpm -ivh python-2.6.6-66.el6_8.x86_64.rpm python-libs-2.6.6-66.el6_8.x86_64.rpm

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

 rpm -ivh  python-pycurl-7.19.0-9.el6.x86_64.rpm rpm -ivh  python-urlgrabber-3.9.1-11.el6.noarch.rpm

強制安裝

rpm -i --force --nodeps  rpm-python-4.8.0-59.el6.x86_64.rpm rpm -ivh yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm  yum-3.2.29-81.el6.centos.noarch.rpm 

設定yum下載源

參考:

https://blog.csdn.net/ytx2014214081/article/details/78468947

https://blog.csdn.net/huoyunshen88/article/details/37763911

http://mirrors.163.com/centos/6/os/x86_64/Packages/