免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1962 | 回复: 0
打印 上一主题 下一主题

yum的/repodata/repomd.xml的错误浅析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-27 11:50 |只看该作者 |倒序浏览

Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和redhat中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。
       接触了yum的不久,就开始按照要求,配置了一个yum,但是折腾了大半天“/repodata/repomd.xml”的错误一直到现在才明白。这不,写下来与大家分享,以此日志。

/etc/yum.repos.d/rhel-debuginfo.repo文件的内容:
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
baseurl=file:///mnt/ ##安装文件的目录,这是从局域网中挂载的rhel5.2的安装包和文件
enabled=1
gpgcheck=1 ##1为激活gpg检测,0为否
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release ##、mnt下对应的rpm包的验证文件
[root@test mnt]# yum list
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
ftp:///mnt/repodata/repomd.xml: [Errno 4] IOError: [Errno ftp error] no host given
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-debuginfo. Please verify its path and try again
      上述中的repodata/repomd.xml文件据说是/mnt目录rpm包的目录,路径
       在/mnt中因为没有/repodata/repomd.xml 这个文件,所以提示出错,其实不是网上所说的软件库路径的问题。这也是明明在/mnt下看到我们要安装的包,而提示没有的缘故。

     在网上找到centos的安装源http://centos.ustc.edu.cn/centos/5/os/i386/,替换掉上面的baseurl后,经测试正常!因为是rhel和centos有些不同的原因,提示某些包的Public key没有安装,如下:
Public key for httpd-2.2.3-11.el5_1.centos.3.i386.rpm is not installed
但httpd服务已经安装了。

      从这些看出,不是我们的配置问题,而是/repodata/repomd.xml这个文件不存在。其实错误已经很明显提示了!


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/94145/showart_2008767.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP