• 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 

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




  • 相关阅读:
    Nginx配置文件详解
    JVM调优—性能分析神器-JProfiler详解
    Navicat Premium 15破解
    Nginx配置反向代理,负载均衡,动静分离,高可用
    Nginx安装和常用命令
    Spring中ApplicationContextAware的作用
    java中发起http和https请求
    MySql高可用架构
    matlab画3维meshgrid/plot3/mesh/surf的用法
    如何规范地编写一个MATLAB函数文件
  • 原文地址:https://www.cnblogs.com/chaihy/p/13995300.html
Copyright © 2020-2023  润新知