CentOS系统Python升级后yum不可用的解决办法
来源:互联网 发布:音频算法工程师 编辑:程序博客网 时间:2024/05/02 01:38
通过升级Python后,发现yum命令不能使用了!!!
如何升级Python?详见
CentOS系统升级Python
出现如下错误:
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.12 (default, Feb 28 2017, 14:47:53)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
这是因为yum命令是基于Python开发的,当Python升级后,yum命令找不到其所依赖的文件导致不可用。
如何解决呢?
编辑yum的配置文件
vi /usr/bin/yum
将文件首行
#!usr/bin/python
修改为
#!/usr/bin/python2.6.6
保存退出!
经测试yum可用
- CentOS系统Python升级后yum不可用的解决办法
- CentOS 6.4升级Python后yum不可用的解决方案
- Python 升级后yum 不可用
- 升级Python版本后 yum命令不可用
- python 升级 yum 不可用解决方法
- 解决修改完系统默认python版本后yum不可用的问题
- 解决python升级后yum不能用的问题
- CentOS 5.6 系统Python升级 和 Yum工具的修复
- CentOS 5.6 系统Python升级 和 Yum工具的修复
- 将Python进行升级,已经解决yum不可用的问题
- centos升级python,以及yum的修复
- CentOS系统的YUM在线升级机制
- VM虚拟机下,Ubuntu升级后Shared Folder不可用的解决办法
- IE升级后,cyberArticle 保存当前网页不可用的解决办法
- mac升级到10.11.3后CocoaPods不可用的解决办法
- CentOS 7 升级Python到3.5后,yum,和gnome-twear-tool 出现的问题
- 升级CentOS系统的python
- mac 更新到macos sierra 系统后idea的svn不可用解决办法
- 安卓6.0权限使用
- blog.codedream.ren
- CSDN日报20170228——《技术晋升的评定与博弈》
- srand(time(0)) ;
- Lazy Loading In AngularJS(懒加载)
- CentOS系统Python升级后yum不可用的解决办法
- python day7(20170228 )
- 杭州电子科技大学程序设计竞赛(2016’12)- 网络同步赛
- Mysql占用CPU过高如何优化,如何解决
- RHEL7.0 配置网络IP的三种方法
- 【九度OJ】题目1433:FatMouse 解题报告
- qtouch嵌入式应用
- ceph 源码编译in redhat6.6
- ios学习笔记之-UIStepper