zoukankan      html  css  js  c++  java
  • 更新yum源导致yum不可用

    当安装和yum配置相关的包后报yum模块找不到

    yum install -y yum-utils device-mapper-persistent-data lvm2
     yum list|grep yum
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:
    
       No module named yum
    # 查看/usr/bin/yum
    more /usr/bin/yum
    #!/usr/bin/python
    import sys
    try:
        import yum
    except ImportError:
        print >> sys.stderr, """

    yum 包是集成在Python2.6版本中的,而Linux默认都是安装Python2.6,且执行文件为/usr/bin/python2.6

    上述包安装后,/usr/bin/yum文件被变更,Python执行路径变为了/usr/bin/python,将其改为/usr/bin/python2.6即可

  • 相关阅读:
    python timeit模块用法
    boto3库限速
    golang-Beego-orm创建的坑
    Java07
    Java06
    Java04
    Java03
    c
    Mac 安装GCC
    命令: go build
  • 原文地址:https://www.cnblogs.com/Bccd/p/7404127.html
Copyright © 2011-2022 走看看