Centos 7 python2 升级 python3 后,yum 有问题

Centos 7  python2 升级 python3 后,yum 有问题

1.问题如下:
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: ftp.iij.ad.jp
 * epel: ftp.kddilabs.jp
 * epel-debuginfo: ftp.kddilabs.jp
 * epel-source: ftp.kddilabs.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
                  ^
SyntaxError: invalid syntax
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
                  ^
SyntaxError: invalid syntax
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
... ...

2.解决办法:
a)   最简单的方法:将python的软连接 改回为python2 即可;(如:/usr/bin/python ----> /usr/bin/python改回python2的路径)
b)   其他好方法,希望你自己发现告知我,谢谢!




你可能感兴趣的:(运维)