Python升级Yum不能使用解决
1、系统版本
[root@vm10-254-206-95 ~]# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
2、系统默认python版本
[root@vm10-254-206-95 ~]# python -V
Python 2.6.6
3、报错信息
[root@vm10-254-206-95 ~]# 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.5.4 (r254:67916, Feb 24 2010, 10:03:49)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
解决方法:
[root@vm10-254-206-95 ~]# which yum
/usr/bin/yum [root@vm10-254-206-95 ~]# vi /usr/bin/yum
将
#!/usr/bin/python
改为:
#!/usr/bin/python2.6
然后保存OK.
Python升级Yum不能使用解决的更多相关文章
- centos 卸载python和yum之后的解决办法
网上看到有同学yum不能使用的消息,出现了下面的结果 无赖的使用了网上的很多方法,还是不行. 于是我卸载了python和yum,觉得自己重新安装python和yum. 步骤1:卸载python rpm ...
- Linux CentOs6.5误卸载自带python和yum后的解决办法
事故背景:前几天因项目需要,在服务器上搭建python-mysql模块,结果没安装好,于是乎想卸载重装,遂在网上查询卸载python的方法,结果一不小心直接把系统的python删了个干净....... ...
- linux 升级yum对应的python
这里记录一下linux 系统升级python对yum带来影响的解决办法 很多人在使用linux系统执行python任务的时候需要升级linux系统自带的python到高级版本.具体如何升级python ...
- CENTOS下Python 升级后YUM无法使用的解决办法
Python有很多实用的工具,安装依赖python版本较高,升级Python后导致yum无法使用. 原因: 系统自带的yum依赖Python老版本,升级后不兼容 解决办法: 1. 列出所有版本,确定老 ...
- 升级python导致yum报错的解决方法
把python从2.7升级到3.6后 , 使用yum报错 File ‘’/usr/bin/yum'', line 30 except KeyboardInterrupt, e: ^ 故障原因:yum采 ...
- 如何解决python升级后yum报错
当我们yum命令的时候,会提示 "File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ SyntaxEr ...
- python升级带来的yum异常:File "/usr/bin/yum", line 30
问题: $ yum File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ SyntaxError: invalid ...
- CentOS6 系统下升级python后yum命令使用时报错
CentOS6 系统下升级python后yum命令使用时报错,如下: [root@xxxxxxx]#yumFile"/usr/bin/yum",line30exceptKeyboa ...
- python升级3.6后 yum出错File "/usr/bin/yum", line 30 ^
问题描述: # yum provides ifconfig File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ ...
随机推荐
- Android仿QQ窗口的抖动的动画效果
就是仿照QQ窗口的抖动效果,在项目的res下创建anim文件夹,再创建两个xml文件:cycle.xml . myanim.xml cycle.xml : <?xml version ...
- Maven 命令操作项目
1.创建一个多模块的Java项目 shift+鼠标右键 创建项目命令: 旧版: mvn archetype:create -DgroupId=com.qhong -DartifactId=MavenP ...
- Spring Boot 5 SpringSecurity身份验证
对于没有访问权限的用户需要转到登录表单页面.要实现访问控制的方法多种多样,可以通过Aop.拦截器实现,也可以通过框架实现(如:Apache Shiro.Spring Security). pom.xm ...
- selenium 回放时遇到的问题
回放时,系统报”Window does not exist” 录制时,存在弹出页面 回放时,系统会报以下的错误: 问题的根本原因: window 窗口没有id和name属性,系统会自动生成name属性 ...
- [PCL]keypoint
1. Harris角点 http://www.cnblogs.com/ironstark/p/5064848.html 2. ISS关键点 http://www.cnblogs.com/ironsta ...
- [Linux]gdb调试
exbot@ubuntu:~/CodeLearn/HelloWorld/src$ g++ -g main.cpp exbot@ubuntu:~/CodeLearn/HelloWorld/src$ ./ ...
- go 语言的库文件放在哪里?如何通过nginx代理后还能正确获取远程地址
/usr/local/Cellar/go/1.5.1/libexec/src/ 他的RemoteAddr 是从哪里获取? func (c *conn) RemoteAddr() Addr { if ! ...
- 让show parameter显示隐含参数(12C)
1.创建视图show_hidden_v$parameter create or replace view show_hidden_v$parameter (inst_id,NUM , NAME , T ...
- tcpdump note
from http://www.cnblogs.com/ggjucheng/archive/2012/01/14/2322659.html 用简单的话来定义tcpdump,就是:dump the tr ...
- LinkedHashMap 和 LRU算法实现
个人觉得LinkedHashMap 存在的意义就是为了实现 LRU 算法. public class LinkedHashMap<K,V> extends HashMap<K,V&g ...