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: ^ ...
随机推荐
- IntelliJ IDEA 的 Jetty部署插件
jetty相对于tomcat来说,启动速度非常快,方便调试. 在idea的maven项目中,只需要在pom.xml配置文件中配置jetty的插件即可. 全部: <project xmlns=&q ...
- Xib文件的使用
- less 初试
第一次接触less,做些记录. 官网 民间中文文档 less notepad++插件 1. 支持变量声明 支持颜色.大小等相加 @nice-blue: #5B83AD; @light ...
- JDK里的设计模式
一.Creational patterns 创建模式 Abstract factory (recognizeable by creational methods returning the facto ...
- JAX-WS(二)之使用wsimport创建WebService客户端
客户端开发的通常过程是从已有的WSDL处罚,创建辅助类JAXB对象和Service代理类,然后基于这些类开发自己的客户端应用. 开发步骤: 创建eclipse项目: 运行wsimport命令生成客户端 ...
- intellij idea exclude from compile后怎么加回来
File->Settings-> Build,Execution,Deployment->Compiler-> Execludes
- IDEA SDK(Software Development Kit) 介绍
如上图标注 1 所示,IntelliJ IDEA 支持 6 种 SDK.最常用的就是 JDK 和 Android SDK,其中在创建 Android SDK 的时候如果你没有先配置一个 JDK 的话, ...
- Leetcode: Mini Parser
Given a nested list of integers represented as a string, implement a parser to deserialize it. Each ...
- SQL order 排序
select * from emp;
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Team Formation
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial ...