python升级到3.6发现想 因为yum是基于2.7想继续给yum升级 结果弄坏了 yum也用不了,没有yum就像是断了腿的人。。。。
于是只能python和yum重装了
1、删除现有Python [root@master~]# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps ##强制删除已安装程序及其关联 [root@test ~]# whereis python |xargs rm -frv ##删除所有残余文件 ##xargs,允许你对输出执行其他某些命令 [root@master ~]# whereis python ##验证删除,返回无结果 2、删除现有的yum [root@master ~]# rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps [root@master ~]# whereis yum |xargs rm -frv
创建目录python和yum用以存放rpm包
#mkdir /usr/local/src/python
cd /usr/local/src/python
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/python-2.7.5-58.el7.x86_64.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/dbus-python-devel-1.1.1-9.el7.x86_64.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/python-libs-2.7.5-58.el7.x86_64.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/rpm-python-4.11.3-25.el7.x86_64.rpm
安装执行
rpm -ivh python-* rpm-python-* --nodeps --force
#mkdir /usr/local/src/yum
cd /usr/local/src/yum
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://vault.centos.org/7.4.1708/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
执行安装
rpm -ivh yum-*
vault的源比较慢可以用163的源 http://mirrors.163.com/centos
于是继续折腾升级的事