• 查看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. 【WPF】非UI线程操作UI

    在线程中添加下面两行,把操作UI的命令放到一个新函数中 Action 起个名 = new Action(操作UI的函数名);要操作的控件名.Dispatcher.BeginInvoke(起个名);

  2. windows使用放大镜快速放大屏幕局部

    Win10系统自带放大镜有时真的是比较难使用的,但是如果你对他的快捷键有所了解之后就会感觉它其实也没有那么难,用户可以在使用完之后直接按快捷键将其关闭,一起看看吧. Win10系统放大镜快速关闭快捷键 ...

  3. XML JS Demo

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  4. WCF客户端代理

    创建类库WCFServiceProxy 添加System.ServiceModel.WCFService(见上篇文章)引用 创建类:BookServiceClient using System; us ...

  5. elasticsearch的cross_fields查询

    1.most_fields 这种方式搜索也存在某些问题 它不能使用 operator 或 minimum_should_match 参数来降低次相关结果造成的长尾效应. 2.词 peter 和 smi ...

  6. Unity打包出来的App 跳转其他 App

    void Start()//在android测试成功 { bool fail = false; string bundleId = "跳转的包名";//包名称 AndroidJav ...

  7. Lombok的使用与原理

        在面向对象编程中必不可少需要在代码中定义对象模型,而在基于Java的业务平台开发实践中尤其如此.相信大家在平时开发中也深有感触,本来是没有多少代码开发量的,但是因为定义的业务模型对象比较多,而 ...

  8. python 爬虫 urllib模块介绍

    一.urllib库 概念:urllib是Python自带的一个用于爬虫的库,其主要作用就是可以通过代码模拟浏览器发送请求.其常被用到的子模块在Python3中的为urllib.request和urll ...

  9. IIS 404设置

    想给自己做的的网站自定义一个404页面,开始 双击红框提示的错误页图标 双击上图红框提示的所示404行 修改上图红框提示的内容如下:我是直接在根目录放了一个自己做的404.html,实际情况要填写你自 ...

  10. python 学习笔记三 (元编程)

    #动态创建类 # type(class_name, tuple_of_parent_class, dict_of_attribute_names_and_values), 第二个参数为继承关系,可以为 ...