linux Python升级导致Yum无法使用
来源:互联网 发布:mac 拷贝照片到u盘 编辑:程序博客网 时间:2024/05/01 10:00
yum -y install libtool
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.8 (default, Apr 7 2017, 03:20:15)
[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 不相符,提示当前版本是2.7.8可能版本不匹配。没有yum依赖的包。
3、查看yum版本
rpm -qa |grep yum
4、查看python版本
whereis python
python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/local/bin/python2.6 /usr/local/bin/python2.6-config /usr/local/bin/python /usr/local/lib/python2.6 /usr/share/man/man1/python.1.gz
果然装了两个版本python
5、执行python,查看到使用2.6.1的版本
Python 2.7.8 (default, Apr 7 2017, 03:20:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
6、猜测yum调用了高版本的python。
7、解决方法:
查找yum文件,并编辑此py文件
which yum
/usr/bin/yum
vi /usr/bin/yum
将
#!/usr/bin/python
改为:
#!/usr/bin/python2.6
然后保存OK.
yum -y install libtool
补充:yum基于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.8 (default, Apr 7 2017, 03:20:15)
[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 不相符,提示当前版本是2.7.8可能版本不匹配。没有yum依赖的包。
3、查看yum版本
rpm -qa |grep yum
4、查看python版本
whereis python
python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/local/bin/python2.6 /usr/local/bin/python2.6-config /usr/local/bin/python /usr/local/lib/python2.6 /usr/share/man/man1/python.1.gz
果然装了两个版本python
5、执行python,查看到使用2.6.1的版本
Python 2.7.8 (default, Apr 7 2017, 03:20:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
6、猜测yum调用了高版本的python。
7、解决方法:
查找yum文件,并编辑此py文件
which yum
/usr/bin/yum
vi /usr/bin/yum
将
#!/usr/bin/python
改为:
#!/usr/bin/python2.6
然后保存OK.
yum -y install libtool
补充:yum基于python写的。
0 0
- linux Python升级导致Yum无法使用
- centos升级python导致yum无法使用
- python升级导致yum命令无法使用的解决办法
- python升级导致yum命令无法使用的解决办法
- python升级导致yum命令无法使用的解决办法
- Python升级或降级导致yum命令无法使用
- centos6下升级python导致yum无法使用的解决办法
- centos中python升级导致yum命令无法使用
- Python升级导致使用yum报错
- [linux]因python升级导致的yum命令无法执行
- 升级Python而导致的YUM服务无法使用的修复方法
- python升级导致yum命令无法使用的解决办法(修改版)
- python升级导致yum命令无法使用的解决办法(修改版)
- python升级后yum无法使用
- python 升级导致yum失败
- fedora 15 升级python后yum无法使用的解决方法
- CentOS中python升级之后yum无法使用的问题
- 升级Python导致yum报错
- Struts2--动态Action的三种实现方法
- windows-linux互传文件便捷操作
- Caffe训练和测试自己的数据集
- 微服务
- <感受5>
- linux Python升级导致Yum无法使用
- Spring架构及设计理念
- 我为什么要写技术博客
- 利用python正则表达式抓取网页中的图片到本地
- JavaScript中JSON.stringify()与JSON.parse()
- 定义 动态的导航栏高亮
- HTML5基础加强css样式篇(white-space属性)(四十三)
- Hadoop-HBase 单机部署
- arcgis for js 手动触发infoWindow弹窗