zoukankan      html  css  js  c++  java
  • linux centos7 yum卸载 安装

    卸载yum

    查看:rpm -qa |grep yum

    卸载:rpm -aq|grep yum|xargs rpm -e --nodeps

    还是无意间执行 yum remove yum卸载了yum,重新安装思路如下:

    安装yum

    下载RPM包  http://mirrors.163.com/centos/7/os/x86_64/Packages/

    centos7 为例:

    weget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm

    weget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-cron-3.4.3-168.el7.centos.noarch.rpm 

    weget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm

    weget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

    weget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

    rpm -ivh --force --nodeps python-urlgrabber-3.10-10.el7.noarch.rpm

    rpm -ivh --force --nodeps yum-cron-3.4.3-168.el7.centos.noarch.rpm 

    rpm -ivh --force --nodeps yum-3.4.3-168.el7.centos.noarch.rpm

    rpm -ivh --force --nodeps yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

    rpm -ivh --force --nodeps yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

    yum  

    如果出现 

    no module named yum

    这个问题解决方案:

    下载:  http://mirrors.163.com/centos/7/os/x86_64/Packages/

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-2.7.5-89.el7.x86_64.rpm 

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-3.el7.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-devel-2.7.5-89.el7.x86_64.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-libs-2.7.5-89.el7.x86_64.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-setuptools-0.9.8-7.el7.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-python-4.11.3-45.el7.x86_64.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-aliases-1.1.31-54.el7_8.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-protectbase-1.1.31-54.el7_8.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-54.el7_8.noarch.rpm

    wget  http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-54.el7_8.noarch.rpm

    rpm -ivh --force *.rpm --nodeps

    然后再yum 

    如又不懂,或遇到其他问题请加群讨论




  • 相关阅读:
    完毕port(CompletionPort)具体解释
    [Java聊天室server]实战之五 读写循环(服务端)
    ImageMagick的安装及使用
    STL学习小结
    ORACLE中%TYPE和%ROWTYPE的使用
    命令模式在MVC框架中的应用
    代码阅读分析工具Understand 2.0试用
    SimpleDateFormat 的线程安全问题与解决方式
    C++垃圾回收机制
    TH文字编辑器开发的第一个游戏,唐伯虎泡妞
  • 原文地址:https://www.cnblogs.com/chaihy/p/13995300.html
Copyright © 2011-2022 走看看