• 查看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. HCL试验4

    PC端配置:配置ip地址 配置网关 交换机配置:①创建VLAN system-view vlan 10 vlan 20 ②配置PC端接口 interface vlan-interface 10 ip ...

  2. cisco路由的ip路由(一)

    路由Corp配置Corp#sh run Building configuration... Current configuration : 1652 bytes ! version 12.4 no s ...

  3. python 实现 灰色预测 GM(1,1)模型 灰色系统 预测 灰色预测公式推导

    来源公式推导连接 https://blog.csdn.net/qq_36387683/article/details/88554434 关键词:灰色预测 python 实现 灰色预测 GM(1,1)模 ...

  4. base64图片数据类型转numpy的ndarray矩阵类型数据

    1.两种方法如下链接 https://www.cnblogs.com/mtcnn/p/9411683.html 2.第一种方法: # coding: utf-8 # python base64 编解码 ...

  5. 【并行计算-CUDA开发】从零开始学习OpenCL开发(一)架构

    多谢大家关注 转载本文请注明:http://blog.csdn.net/leonwei/article/details/8880012 本文将作为我<从零开始做OpenCL开发>系列文章的 ...

  6. 统计学习方法 | 第3章 k邻近法 | 补充

    namedtuple 不必再通过索引值进行访问,你可以把它看做一个字典通过名字进行访问,只不过其中的值是不能改变的. sorted()适用于任何可迭代容器,list.sort()仅支持list(本身就 ...

  7. rtsp学习----海康RTSP客户端连接深入分析

    转载于:http://blog.csdn.net/zhouyongku/article/details/41546789 海康相机RTSP连接代码分析 最近在做海康相机rtsp连接获取音视频的工作,现 ...

  8. (5.1)mysql高可用系列——高可用架构方案概述

    关键词:mysql高可用概述,mysql高可用架构 常用高可用方案 20190918 现在业内常用的MySQL高可用方案有哪些?目前来说,用的比较多的开源方案分内置高可用与外部实现,内置高可用有如下: ...

  9. ABC136E Max GCD

    Thinking about different ways of thinking. --- LzyRapx 题目 思路比较容易想到. Observations: 每次操作过后和不变. 枚举和的因子 ...

  10. 卸载mysql后再安装提示The service already exists!问题解决方法

    卸载mysql后再安装输入mysqld --install 回车后提示The service already exists! 原因:卸载的时候没有卸载干净 方法: 一.重新以管理员身份打开cmd 二. ...