• 查看redhat原有的yum包有哪些:
[root@localhost ~]# rpm -qa|grep yum
yum-utils-1.1.31-24.el7.noarch
yum-langpacks-0.4.2-3.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-rhn-plugin-2.0.1-4.el7.noarch
PackageKit-yum-0.8.9-11.el7.x86_64
yum-3.4.3-118.el7.noarch
  • 尝试使用xargs来删除这些包
[root@localhost ~]# rpm -qa|grep yum|xargs rmp -e --nodeps
xargs: rmp: 没有那个文件或目录
  • 没有xargs 一个一个删除
[root@localhost ~]# rpm -qa|grep xargs
[root@localhost ~]# rpm -e --nodeps yum-utils-1.1.31-24.el7.noarch
[root@localhost ~]# rpm -e --nodeps yum-langpacks-0.4.2-3.el7.noarch
[root@localhost ~]# rpm -e --nodeps yum-metadata-parser-1.1.4-10.el7.x86_64
[root@localhost ~]# rpm -e --nodeps yum-rhn-plugin-2.0.1-4.el7.noarch
[root@localhost ~]# rpm -e --nodeps PackageKit-yum-0.8.9-11.el7.x86_64
[root@localhost ~]# rpm -e --nodeps  rpm -e --nodeps yum-3.4.3-118.el7.noarch
[root@localhost ~]# rpm -qa|grep yum
  • 查看当前操作系统版本
[root@localhost ~]# cd /etc
[root@localhost etc]# cat redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
 
  • 下载centos的yum
[root@localhost ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm 
[root@localhost ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm 
[root@localhost ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm 
 
 
  • 安装centos的yum 安装过程中发现依赖了python-urlgrabber 又下载并安装了它安装python-urlgrabber 必须先删除老的版本
[root@localhost ~]# rpm -e --nodeps  python-urlgrabber-3.10-4.el7.noarch
[root@localhost ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm 
[root@localhost ~]#rpm -ivh python-urlgrabber-3.10-8.el7.noarch.rpm 
[root@localhost ~]#rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm 
  • 最后两个相互依赖 所以要放在一起执行
[root@localhost ~]#rpm -ivh  yum-3.4.3-150.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm 
 
  • 更换yum源
[root@localhost ~]#cd /etc/yum.repos.d/
[root@localhost ~]#wget  http://mirrors.163.com/.help/CentOS7-Base-163.repo
 
注意:此处需要将CentOS7-Base-163.repo中的$releasever全部换成7
  • 重建缓存
[root@localhost ~]#yum clean all
[root@localhost ~]#yum makecache
 
 
按照网上的步骤的花,最后一步还有一个“yum update”,会把所有的rpm都更新到最新状态,我暂时觉得没有必要没有执行。
 
最终测试yum install成功。

更换Red Hat Enterprise Linux 7 64位的yum为centos的版本的更多相关文章

  1. 解决问题:Red Hat Enterprise Linux 7 64 位 虚拟机安装后无法启动图形化

    原因: 1.系统在创建时,没有安装图形化 2.系统在安装后,有降低内存的操作,内存过低无法启动桌面,以及其他 就原因一进行图形化安装: 1.VMware挂载Red Hat Enterprise Lin ...

  2. linux云计算集群架构学习笔记:workstation 12.0 按装Red Hat Enterprise Linux 7(64位)

    安装RHEL7.2 步骤: 1.安装虚拟机,按以下截图安装即可  步骤2: Ret hat 7.2 操作系统安装 rhel7因为许可报错解决

  3. Red Hat Enterprise Linux 8.0 安装

    Red Hat Enterprise Linux 8.0 安装 本次安装通过使用VMware Workstation 15 pro 进行. 1.新建虚拟机 2.点击首页的创建新的虚拟机,或者点击标签栏 ...

  4. ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit) (转)

    OS Info----------# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 5.5 (Tikanga)# cat ...

  5. Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...

  6. Red Hat Enterprise Linux

    以下是支持 Docker 的 RHEL 版本: Red Hat Enterprise Linux 7 (64-bit) Red Hat Enterprise Linux 6.5 (64-bit) 或更 ...

  7. Red Hat Enterprise Linux 7.0

    简介 Red Hat Enterprise Linux是Red Hat公司的Linux发行版,面向商业市场,包括大型机.红帽公司从Red Hat Enterprise Linux 5开始对企业版LIN ...

  8. Red Hat Enterprise Linux 7.x新特性

    Red Hat Enterprise Linux 7.x新特性 RHEL7新特性简介 1.      RHEL7目前支持架构 64-bit AMD.64-bit Intel.IBM POWER.IBM ...

  9. Deploy Oracle 10.2.0.5 on Red Hat Enterprise Linux 6.4

    一.Linux系统安装和配置 1.安装系统时选Desktop 2.设置eth0网卡为静态IP,加入子网掩码,网关,DNS.并配置自己主动启动 3.改动/etc/hosts.加入主机名和相应IP 4.禁 ...

随机推荐

  1. ios 后台进程弹窗

    // http://iphonedevwiki.net/index.php/CFUserNotification // https://kunnan.github.io/2018/05/14/com. ...

  2. python-https状态码

    HTTP状态码状态码的职责是当客户端向服务器发送请求时,描述返回的请求结果.借助状态码,用户可以知道服务器端是正常处理了请求,还是出现了错误. 状态码的类别 >>>状态码 类别 说明 ...

  3. caoz的梦呓:信息安全常识科普

    猫宁!!! 参考链接:https://mp.weixin.qq.com/s/cl4TfOodBGSjUuEU8e0rGA 对方公众号:caoz的梦呓 前天在新加坡IC咖啡做了一场关于信息安全的常识普及 ...

  4. CodeForces 1249A --- Yet Another Dividing into Teams

    [CodeForces 1249A --- Yet Another Dividing into Teams] Description You are a coach of a group consis ...

  5. 服务器iptables规则记录

    很多时候,我在我自己的VPS上面部署了Cobalt Strike,可是网上很多叼毛就会扫描我们的VPS,然后发现我们的Cobalt Strike,如果你还建有web delivery,还会被人家下载上 ...

  6. VC/MFC中的CComboBox控件使用详解

    CComboBox控件详解 CComboBox控件又称作组合框控件,其有三种形态可供选择,1.简单组合框(Simple)2.下拉组合框(Drop-down)3.下拉列表式组合框(Drop-down l ...

  7. Interval List Intersections

    Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order ...

  8. DFS搜索算法--(1)基础图遍历 绝对看!的!懂!

    内容总结 自<啊哈!算法!> 作为一个都大二的了一个菜鸡,做题的时候DFS怎么可以不会呢!!! 作为一个都大二了的(!!!)菜鸡....<啊哈算法>这本书第四章的搜索,开始那里 ...

  9. C++练习 | 单链表的创建与输出(结构体格式)

    #include <iostream> #include <stdio.h> using namespace std; #define OK 1 #define ERROR 0 ...

  10. C++练习 | 最长公共字符串(DP)

    HDU 1159.Common Subsequence #include<iostream> #include<stdio.h> #include<string> ...