树莓派(Raspberry Pi 3) centos7使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
使用yum命令报错
File "/usr/bin/yum", line 30
except KeyboardInterrupt, e:
^
SyntaxError: invalid syntax
问题如下: 
问题出现原因:
yum包管理是使用python2.x写的,将python2.x升级到python3.x以后,由于python版本语法兼容性导致问题出现
解决办法:
修改yum配置文件,将python版本指向以前的旧版本
# vi /usr/bin/yum
#!/usr/bin/python2.7
修改urlgrabber-ext-down文件,更改python版本
# vi /usr/libexec/urlgrabber-ext-down
#!/usr/bin/python2.7
树莓派(Raspberry Pi 3) centos7使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:的更多相关文章
- yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 问题出现原因:yum包管理是使用python2 ...
- 使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
背景: yum包的管理是使用python写的,有对应的python版本 遇到的问题报错如下: File "/usr/bin/yum", line 30 except K ...
- 故障小记录:yum 安装报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
发生原因: 由于yum是基于python的,之前安装我python3,当我修改了python命令的指向到python3之后就会发生这样的问题. 解决办法: 由于我当初想到可能以后还需要python2, ...
- yum 安装报错 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
原因: 这是因为yum采用python作为命令解释器,这可以从/usr/bin/yum文件中第一行#!/usr/bin/python发现.而python版本之间兼容性不太好,使得2.X版本与3.0版本 ...
- yum报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
原因:学python的时候,把centos7自带的python2.7改成了python3.6.2.而yum使用的是python2,所以会出现yum报错. 解决方法: 在文件/usr/bin/yum./ ...
- 记录将CentOS7linux系统python升级到3后yum安装是报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ SyntaxError: invalid syntax问题解决
前两天将CentOS7里的python版本升级到了3.5.2 今天想装个解压软件,在执行yum install -y XXX 的时候报错 然后按照提示打开这个文件 vi /usr/bin/yum yu ...
- python报错使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: SyntaxError: invalid syntax问题
参考链接:https://blog.csdn.net/ltz150/article/details/77870735 1.背景: CentOS 7升级Python到3.6.2后,需要在/usr/bin ...
- python升级带来的yum异常(解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:)
解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 错误: 原因: 这是因为yum采用python作为命令解 ...
- 使用yum命令报错
树莓派(Raspberry Pi 3) centos7使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, ...
随机推荐
- python的编解码问题
http://blog.chinaunix.net/uid-27838438-id-4227131.html
- hexo博客相关
https://www.cnblogs.com/sulishibaobei/p/6428241.html 利用hexo+github+nodejs搭建自我博客的一天 http://www.sulish ...
- 内存优化总结:ptmalloc、tcmalloc和jemalloc
概述 需求 系统的物理内存是有限的,而对内存的需求是变化的, 程序的动态性越强,内存管理就越重要,选择合适的内存管理算法会带来明显的性能提升.比如nginx, 它在每个连接accept后会malloc ...
- setcookie函数的注意事项
函数说明 bool setcookie ( string $name [, string $value = "" [, int $expire = 0 [, string $pat ...
- 微服务监控之一:Metrics让微服务运行更透明
摘要 让微服务运行状态清晰可见. 嘉宾演讲视频回顾及PPT:http://t.cn/R8b6i85 Metrics是什么 直译是“度量”,不同的领域定义有所区别,在微服务领域中的定义: “对微服务的某 ...
- DCloud-5+Runtime:杂项
ylbtech-DCloud-5+Runtime:杂项 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 7.返回顶部 8.返回顶部 ...
- 2010.1.1 CLR 无法从 COM 上下文
今天做一个程序,sql操作,但是记录数太多,而且sql语句有复杂,就报了这样的错误: CLR 无法从 COM 上下文 0x645e18 转换为 COM 上下文 0x645f88,这种状态已持续 60 ...
- Profile配置
Profile是Spring用来针对不同环境对不同的配置提供支持的,全局Profile配置使用application-{profile}.properties application.properti ...
- [Codeforces]#179 div1-----295ABCDE
摘自我的github:https://github.com/Anoxxx The Solution Source: Codeforces Round #179 (Div. 1) VJudge链接: h ...
- 将openfire部署到CentOS云服务器上
http://ishere.cn/2014/07/25/centos-64bit-openfire.html CentOS 64位安装openfire http://www.cnblogs. ...