linux卸载python2.7_linux 全部卸载python yum 重新安装
Python升级导致yum不可用 “ No module named yum”
[root@localhost python]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.13 (r266:84292, Jan 22 2014, 09:37:14)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
解决办法:python和yum 全部卸载 重新安装
步骤1:卸载python
rpm -qa|grep python|xargs rpm -e --allmatches --nodeps
whereis python|xargs rm -fr
步骤2:卸载yum
rpm -qa|grep yum|xargs rpm -e --allmatches --nodeps
rm -rf /etc/yum.repos.d/*
whereis yum|xargs rm -fr
步骤3:安装python 和 yum
从linux安装包ISO文件中,查找到python和yum相关的rpm文件,上传到linux服务器
mkdir /usr/local/src/python
// 上传*python*.rpm 文件到此路径下
rpm -ivh --nodeps *python*
mkdir /usr/local/src/yum
// 上传*yum*.rpm 文件到此路径下
rpm -ivh --nodeps *yum*
步骤4:测试
[root@localhost yum]# python
Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
[root@localhost yum]# yum --version
3.2.29
Installed: rpm-4.8.0-32.el6.x86_64 at 2018-01-30 09:44
Built : CentOS BuildSystem at 2013-02-22 02:13
Committed: Florian Festi at 2012-11-15
Installed: yum-3.2.29-40.el6.centos.noarch at 2018-02-02 06:27
Built : CentOS BuildSystem at 2013-02-22 11:26
Committed: Johnny Hughes at 2013-02-21
Installed: yum-plugin-aliases-1.1.30-14.el6.noarch at 2018-02-02 06:27
Built : CentOS BuildSystem at 2012-06-22 12:23
Committed: Zdenek Pavlas at 2012-04-26
Installed: yum-plugin-fastestmirror-1.1.30-14.el6.noarch at 2018-02-02 06:27
Built : CentOS BuildSystem at 2012-06-22 12:23
Committed: Zdenek Pavlas at 2012-04-26
linux卸载python2.7_linux 全部卸载python yum 重新安装相关推荐
- 卸载python2.7_强力卸载软件,强力删除软件 - 怎么强力卸载软件 - 安全专题
现在互联网出现各种各样的流氓软件,流氓软件最显著的特点是无法卸载软件,或者卸载软件卸载不干净.为了解决广大网民无法卸载软件的问题,新毒霸集成了闪电卸载功能,请广大网民赶紧下载使用吧. 哪些情况需要强力 ...
- 卸载python2.7_系统卸载器(Uninstall Tool)
系统卸载器UninstallTool可替代系统卸载程序的软件,UninstallTool可显示隐藏的安装程序,按名称过滤已安装程序的列表,强行卸载程序,浏览注册表项目,保存安装程序列表. Uninst ...
- linux环境下python安装与卸载--Python2及Python3
一:安装Python 1.python 下载: Python3:wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz Py ...
- 手抖把Python2.7卸载了,导致了自己的yum不可用
摘要: 从标题就能看到我有多心如死灰了,简单介绍下我是如何自残的过程. ①首先因为需要部署爬虫程序,然后安装Python3. ②Python3系列和Python2系列版本不向下兼容,所以我就卸载了机器 ...
- Linux yum卸载提示 Error: Trying to remove “yum”, which is protected
方法暴力!自己评估是否可用! 今天给linux添加Python,发现机子已经添加了,因为客户机子用的是环境一键包,为了方便日后客户自己维护,就想统一下Python的目录,懒得备份换目录等等了,就重新装 ...
- 安装了两个python 如何卸载其中一个_python2卸载
广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 开发准备cas 的 python sdk 包含了用于访问和操作 cas 的所有 ...
- 卸载python2_ubuntu下卸载python2和升级python3.5
卸载python只需一条语句就可以实现 sudu apt-get remove python ubuntu下安装python3 sudo apt-get install python3 但这样只安装了 ...
- Centos7卸载Python2.7.5后安装Python3.11.1
卸载Python2.7.5 #强制删除已安装python及其关联 rpm -qa|grep python|xargs rpm -ev –allmatches –nodeps #删除残余文件 where ...
- python卸载pip_手把手教你Python pip怎么卸载某个已装的包-百度经验
很多初学Python的小伙伴都会遇到这样的事,当我们学会怎么安装某个包(模块)之后,我们却不知道怎么卸载已经装在电脑上的python包. 今天小编就教大家怎么卸载已经安装好的包(模块) 工具/原料 P ...
最新文章
- jQuery 表格自动增加
- [C++STL]仿函数用法介绍
- python调用带参函数_Python | 带有示例的函数调用类型
- OpenStack —— DevStack一键自动化安装
- Python数据挖掘-相关性-相关分析
- mysql异机还原_MySQL innobackupex全量备份恢复
- 开发测试矛盾java吧_不愿看到Java开发者再做的10件事
- 三分钟训练眼球追踪术,AI就知道你在盯着哪个妹子 | TensorFlow.js代码
- PowerBI开发 第四篇:DAX表达式
- pyqt5-QFrame边框样式
- 深入了解mysql 5.5分区功能增强_深入了解MySQL 5.5分区功能增强
- Excel中绘制斜线表头
- EPLAN 电气工程图纸
- 火车头采集优化-收集的文章内容怎么批量变成原创文章
- 升级计算机的图形卡和驱动程序,驱动程序向导如何更新图形卡驱动程序?更新图形驱动程序方法说明...
- 毕业之后从事前端工作月薪大概多少?
- 编写和部署智能合约:智能合约工具、remix、Truffle
- 1-2 认识905.4王国的交流规范
- PHP(时间)计算本月本周下月下周
- Android实现二维码扫描功能-ZXing识别图片二维码,相册选图
热门文章
- 解决jenkins构建失败,空间不足问题
- java开发微信公众号接受并回复消息[工程代码+图片全解]
- torch中的乘法符号(*),torch.mm()和torch.matmul(),torch.mul(), torch.bmm()
- ipad10和ipad air5区别对比
- UG/NX10二次开发学习视频目录整理(NXOPEN制图篇)
- Focusky教程 | 如何解决双击工程文件后提示文件不存在的问题?
- 13种主流机器学习的框架
- 只用1个div,你能用CSS常规属性绘制:正3、4、5、6、7、8边形吗?
- Mybatis-plus sql注入以及防止sql注入
- 水库防汛泄洪抢险应急广播系统建设4G无线广播模式分析