zoukankan      html  css  js  c++  java
  • CentOS 7升级Python到3.6.6后yum出错问题解决总结

     

       最近将一台测试服务器操作系统升级到了Cent0S 7.5,然后顺便也将Python从2.7.5升级到Python 3.6.6,升级完成后,发现yum安装相关包时出现异常,报File "/usr/libexec/urlgrabber-ext-down", line 28这样的错误, 具体错误信息如下所示:

     

    # yum install openssl

     

    ..........................

    Total download size: 1.7 M

    Is this ok [y/d/N]: y

    Downloading packages:

    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.

      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

     

      测试、验证了一下,可以用下面这种方法解决这个问题:

     

    修改/usr/libexec/urlgrabber-ext-down中的Python版本信息

     

    vi /usr/libexec/urlgrabber-ext-down 将/usr/bin/python改为/usr/bin/python2.7。

  • 相关阅读:
    oracle学习13
    oracle学习12
    oracle学习11
    oracle学习10
    CodeForces
    CodeForces
    UVA
    poj3320 Jessica's Reading Problem
    poj2456 Aggressive cows
    jQuery 鼠标滚轮插件 mousewheel
  • 原文地址:https://www.cnblogs.com/kerrycode/p/11553470.html
Copyright © 2011-2022 走看看