中标麒麟卸载安装yum和python
Posted 爱锅巴
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了中标麒麟卸载安装yum和python相关的知识,希望对你有一定的参考价值。
中标麒麟卸载安装yum和python
卸载Python
强制删除已安装Python及其关联
[root@Charlie ~]# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps
删除所有残余文件
[root@Charlie ~]# whereis python |xargs rm -frv
验证删除,返回无结果表示卸载干净了
[root@Charlie ~]# whereis python
同理卸载yum
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
whereis yum |xargs rm -frv
whereis yum
下载软件
在官方软件库找自己系统对应版本和软件
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/lvm2-python-libs-2.02.171-8.el7.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-libs-2.7.5-58.el7.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-ipaddress-1.0.16-2.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-backports-1.0-8.el7.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-2.7.5-58.el7.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-iniparse-0.4-9.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-pycurl-7.19.0-19.el7.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-urlgrabber-3.10-8.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-setuptools-0.9.8-7.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-kitchen-1.1.1-5.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/python-chardet-2.2.1-1.el7_1.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/rpm-python-4.11.3-25.el7.ns7.02.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/yum-utils-1.1.31-42.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/yum-3.4.3-154.el7.ns7.02.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/yum-plugin-aliases-1.1.31-42.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/yum-plugin-protectbase-1.1.31-42.el7.noarch.rpm
wget http://download.cs2c.com.cn/neokylin/server/everything/5.4/x86_64/os/packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
安装
rpm -Uvh --replacepkgs lvm2-python-libs*.rpm --nodeps --force
rpm -Uvh --replacepkgs libxml2-python*.rpm --nodeps --force
rpm -Uvh --replacepkgs python*.rpm --nodeps --force
rpm -Uvh --replacepkgs rpm-python*.rpm yum*.rpm --nodeps --force
至此结束,试一下yum可用了
以上是关于中标麒麟卸载安装yum和python的主要内容,如果未能解决你的问题,请参考以下文章