yum install 报错

把python2升级到python3以后,yum报错:

[root@localhost Python-3.6.6]# yum install openssl
  File "/usr/bin/yum", line 30
    except KeyboardInterrupt, e:
                            ^
SyntaxError: invalid syntax

原因:

yum包使用python2*等开发,python升级到3以后不兼容

解决方法:

修改文件/usr/bin/yum、/usr/libexec/urlgrabber-ext-down头中相应#!/usr/bin/python为#!/usr/bin/python2.7

posted @ 2018-07-31 16:00  江南叶少  阅读(284)  评论(0编辑  收藏  举报