• 查看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. Ubuntu腾讯云主机安装分布式memcache服务器,C#中连接云主机进行存储的示例

    Ubuntu腾讯云主机安装分布式memcache服务器,C#中连接云主机进行存储的示例(github代码:https://github.com/qq719862911/MemcacheTestDemo ...

  2. react navigation goBack()返回到任意页面(不集成redux) 一

    方案一: 一.适用场景:在app端开发的时候,相反回到某一个页面的时候保持跳转页面的所有状态不更新,也就是说不触发新的生命周期. 例如:A——>B——>C——>D 要想从D页面直接返 ...

  3. idea关闭自动更新

    如何关闭idea的自动更新? File-Setting-Appearance&Beha-System Setting-Updates 取消勾选Automatically check updat ...

  4. Unity* 实体组件系统 (ECS)、C# 作业系统和突发编译器入门

    Unity* 中的全新 C# 作业系统和实体组件系统不仅可以让您轻松利用以前未使用的 CPU 资源,还可以帮助您更高效地运行所有游戏代码.然后,您可以使用这些额外的 CPU 资源来添加更多场景动态和沉 ...

  5. C++学习笔记-namespace

    指标识符的各种可见范围.C++标准程序库中的所有标识符都被定义于一个名为std的namespace中 关于iostream <iostream>和<iostream.h>格式不 ...

  6. ORA-00911: invalid character解决方法

    今天在搭建VLS系统后,登录系统测试时发现点击菜单提示错误“ORA-00911:???”.网上很多是因为语句中带分号导致的,但是这次是点开菜单就报错,怀疑是字符集设置的问题. 参考网上的解决方案,添加 ...

  7. 入职一个月快速熟悉大型Vue项目经验感想

    来到和睦的公司家庭已经一个月出头了,从技术层面来说,公司项目PC端是我目前来说接触的最大最复杂的项目了,德老师也说这个不断开发更新迭代的项目的代码量相对于全国的web来说是蛮多的,对于快速熟悉这样的大 ...

  8. 稀疏矩阵三元组快速转置(转poklau123写的很清楚)

    关于稀疏矩阵的快速转置法,首先得明白其是通过对三元表进行转置.如果误以为是对矩阵进行转置,毫无疑问就算你想破脑袋也想不出个所以然,别陷入死胡同了! 对于一个三元表,行为i,列为j,值为v.需将其i与j ...

  9. O001、写在最前面

    参考https://www.cnblogs.com/CloudMan6/p/5224114.html   <每天5分钟玩转 OpenStack>       1.系统讲解 OpenStac ...

  10. new Date,Date.parse()传值

    获取时间: 获取1997年10月1号日期 new Date: 当使用 - 拼接年月日时将会使用UTC时区解析参数,会比北京时间快八小时. 当时用 / 拼接年月日时会使用北京的时区去解析参数,取到的是北 ...