zoukankan      html  css  js  c++  java
  • redhat6.5 配置使用centos的yum源

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统。提示:

    Loaded plugins: product-id, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can us e subscription-manager to register.

    1.删除redhat自带的yum包

    [root@localhost ~]# rpm -qa |grep yum |xargs rpm -e --nodeps
    [root@localhost ~]# rpm -qa |grep yum

    2.下载新的yum包。使用Centos6.5的yum包

    1)查看系统类别

    root@localhost ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 6.5 (Santiago)

    2)下载新的yum包。使用Centos6.5的yum包

    [root@localhost ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

    [root@localhost ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm

    [root@localhost ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm

    [root@localhost ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm

    3)安装

    [root@localhost ~]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm python-urlgrabber-3.9.1-11.el6.noarch.rpm
    warning: yum-metadata-parser-1.1.2-16.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    Preparing... ########################################### [100%]
    file /usr/lib/python2.6/site-packages/urlgrabber/grabber.py from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-9.el6.noarch
    file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyc from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-9.el6.noarch
    file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyo from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-9.el6.noarch
    file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyc from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-9.el6.noarch
    file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyo from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-9.el6.noarch
    [root@localhost ~]# file /usr/lib/python2.6/site-packages/urlgrabber/grabber.py from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-9.el6.noarch

    报错

    查找问题,是python-urlgrabber引起的,要删除掉旧的包

    rpm -e python-urlgrabber-3.9.1-9.el6.noarch

    安装 rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm

    再安装

    [root@localhost ~]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
    warning: yum-metadata-parser-1.1.2-16.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    Preparing... ########################################### [100%]
    1:yum-metadata-parser ########################################### [ 33%]
    2:yum-plugin-fastestmirro########################################### [ 67%]
    3:yum ########################################### [100%]
    [root@localhost ~]#

      4)更换yum源,将原有源删除或备份到别的目下下:
            #cd /etc/yum.repos.d/
            #wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo
           #vi CentOS6-Base-163.repo
            编辑文件,把文件里面的$releasever全部替换为版本号:6(注意,不是6.5!)最后保存!

           :%s/$releasever/6/g 
    3.清除原有缓存,重建缓存:
        #yum clean all
        #yum makecache
        

    参考资源:

    http://blog.sina.com.cn/s/blog_439628be0102woxd.html

    https://blog.csdn.net/zhaihaifei/article/details/54616840

  • 相关阅读:
    关于WPF程序引用(用到)的PresentationFramework.dll版本问题
    【转载】Jenkins在CentOS上安装部署
    关于2021/04/15实施3.0版本到中间层服务器发现IIS管理器的SVC无法浏览另类问题分析
    关于2021/03/02本地服务总线作业调度没起来问题分析
    【转】WCF服务部署到IIS7.5(备忘)
    Dapper参数化查询使用实例
    HIVE和HBASE区别
    Hadoop生态系统官网、下载地址、文档
    Hive中Sqoop的基本用法和常见问题
    读懂hadoop、hbase、hive、spark分布式系统架构
  • 原文地址:https://www.cnblogs.com/venje/p/10959674.html
Copyright © 2011-2022 走看看