redhat6.5安装yum源

   redhat6.5安装yum源。
   我是按照这篇文章安装的https://www.cnblogs.com/zwgblog/p/5840486.html。在安装过程中报错:
一、

[root@xxzx tmp]# rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
warning: python-urlgrabber-3.9.1-11.el6.noarch.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

   “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”
可以看出报错是由于与历史版本发生冲突。
解决办法:执行以下命令,强制安装。

[root@xxzx tmp]# rpm -ivh --force  python-urlgrabber-3.9.1-11.el6.noarch.rpm

执行结果如下:

warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:python-urlgrabber      ########################################### [100%]
[root@xxzx tmp]# rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
warning: yum-3.2.29-81.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:yum-plugin-fastestmirro########################################### [ 50%]
   2:yum                    warning: /etc/yum.conf created as /etc/yum.conf.rpmnew
########################################### [100%]

   表明安装成功。
二、执行yum makecache时报错

yum makecache
http://mirrors.163.com/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
尝试其他镜像。
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

/etc/*.repo配置文件中的baseurl写错了,应该是baseurl=http://mirrors.163.com/centos/6/os/$basearch/,我写成了baseurl=http://mirrors.163.com/centos/6.5/os/$basearch/。修改之后正确执行,如下:

[root@xxzx yum.repos.d]# yum makecache
base                                                     | 3.7 kB     00:00     
base/group_gz                                            | 242 kB     00:00     
base/filelists_db                                        | 6.4 MB     00:00     
base/primary_db                                          | 4.7 MB     00:00     
base/other_db                                            | 2.8 MB     00:00     
extras                                                   | 3.4 kB     00:00     
extras/filelists_db                                      |  24 kB     00:00     
extras/prestodelta                                       | 1.1 kB     00:00     
extras/primary_db                                        |  27 kB     00:00     
extras/other_db                                          |  28 kB     00:00     
rhel-media                                               | 3.9 kB     00:00 ... 
rhel-media/group_gz                                      | 204 kB     00:00 ... 
rhel-media/filelists_db                                  | 3.8 MB     00:00 ... 
rhel-media/primary_db                                    | 3.1 MB     00:00 ... 
rhel-media/other_db                                      | 1.6 MB     00:00 ... 
updates                                                  | 3.4 kB     00:00     
updates/filelists_db                                     | 1.7 MB     00:00     
updates/prestodelta                                      |  79 kB     00:00     
updates/primary_db                                       | 2.4 MB     00:00     
updates/other_db                                         |  33 MB     00:00     
元数据缓存已建立
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值