zoukankan      html  css  js  c++  java
  • 记一次修复yum被破坏

    现象

    # 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
    
    Please install a package which provides this module, or
    verify that the module is installed correctly.
    
    It's possible that the above module doesn't match the
    current version of Python, which is:
    2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
    
    If you cannot solve this problem yourself, please go to
    the yum faq at:
      http://yum.baseurl.org/wiki/Faq
    

    只能重装yum了

    找台正常的机器

    mkdir yum_rpms && cd yum_rpms
    repoquery -R --resolve --recursive yum-3.2.29|xargs -I{} yumdownloader {} --destdir=.
    
    # 卸载旧yum包
    rpm -e --nodeps yum-3.2.29-81.el6.centos.noarch yum-plugin-fastestmirror-1.1.30-40.el6.noarch yum-metadata-parser-1.1.2-16.el6.x86_64
    
    21862  2019-12-19_10:56:04 rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
    21863  2019-12-19_10:56:10 rpm -ivh python-urlgrabber
    21864  2019-12-19_10:56:16 rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
    21865  2019-12-19_10:56:23 rpm -ivh python-pycurl-7.19.0-9.el6.x86_64.rpm
    21866  2019-12-19_10:56:25 rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
    21867  2019-12-19_10:56:33 rpm -ivh yum-*
    21868  2019-12-19_10:56:40 rpm -ivh rpm-python-4.8.0-55.el6.x86_64.rpm
    21869  2019-12-19_10:56:46 rpm -ivh yum-*
    21870  2019-12-19_10:56:49 yum info

    并不是rpm -ivh * 就能解决的, 有依赖关系,缺哪个装哪个

  • 相关阅读:
    Zookeeper
    激活函数
    线程池
    用rand()和srand()产生伪随机数的方法总结 (转贴)
    连接SDE数据库代码
    ProgressBar
    ArcEngine+OpenGL之二系统平台搭建
    我所知道的ArcObjects开发(转)
    oracle wm_concat函数 乱码
    修改32位的AutoCAD2012,使其能在64位系统上安装
  • 原文地址:https://www.cnblogs.com/txwsqk/p/12066698.html
Copyright © 2011-2022 走看看