CentOS 7升级Python到3.5。2后,需要在/usr/bin/python创建了一个指向Python 3的软连接,然后将/usr/bin/yum的顶部的:
!/usr/bin/python
改成了
!/usr/bin/python2.7
后,运行yum,还是出现了以下错误:
[root@master ~]# yum -y groupinstall “X Window System”
File "/usr/libexec/urlgrabber-ext-down", line 28
except OSError, e:
^
SyntaxError: invalid syntax
解决方案:
1.
vim /usr/libexec/urlgrabber-ext-down
将/usr/bin/python改为/usr/bin/python2.7。
2.
vim /usr/bin/yum-config-manager
解决办法同上: #!/usr/bin/python换成 #!/usr/bin/python2.7
标签:bin,python,python2.7,down,yum,usr,File From: https://blog.51cto.com/u_13991401/5923468