由于不小心把自带的yum给卸载了,卸载命令:rpm -qa yum;
在浏览器打开链接:http://mirrors.163.com/centos/6/os/x86_64/Packages/下载这四个包:
python-iniparse-0.4-9.el7.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
yum-3.4.3-158.el7.centos.noarch.rpm
yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
下载完成之后用 rpm -ivh --force --nodeps 命令安装:
rpm -ivh --force --nodeps http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh --force --nodeps http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh --force --nodeps http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
rpm -ivh --force --nodeps http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
下载完成之后下载 yum-3.4.3
wget http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz
解压:tar -zxvf yum-3.4.3.tar.gz #
tar -zxvf yum-3.4.3.tar.gz #解压后进到yum-3.4.3目录
cd yum-3.4.3
执行:./yummain.py update
选择 y
————————————————
版权声明:本文为CSDN博主「tt_best」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/tt_best/article/details/84789933