以下都是在centos命令行输入
查看有无 yum安装包 ,有的话卸载:
查看:rpm -qa |grep yum
卸载:rpm -aq|grep yum|xargs rpm -e --nodeps
第一步: 到这个网站去下载如下RPM包 :http://mirrors.163.com/centos/6/os/x86_64/Packages/
下载安装以下4个包,由于更新问题,可能包名版本不一样,可以查找开头,
比如:python-urlgrabber-3.9.1-11.el6.noarch.rpm,就搜索python-urlgrabber,这样
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-cron-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
第二步:下载完成后安装:python-iniparse-0.3.1-2.1.el6.noarch.rpm 名称要和上面下载的一致
rpm -ivh --force --nodeps python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh --force --nodeps yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
rpm -ivh --force --nodeps yum-3.2.27-14.el6.centos.noarch.rpm um-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm