LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1745|回复: 11

无法读取ISO yum源

[复制链接]
发表于 2006-11-14 05:07:15 | 显示全部楼层 |阅读模式
failed to retrieve Fedora/RPMS/kernel-devel-2.6.18-1.2798.fc6.x86_64.rpm from local iso
error was [Errno 4] IOError: <urlopen error unknown url type: media>

这是为啥?
 楼主| 发表于 2006-11-14 05:18:22 | 显示全部楼层
Post by m20050325
yum的版本多少?好像升级过得yum和光盘不兼容。要用光盘上面的版本。我遇到过。如果你安装了yumex也一样,会自动升级yum。

如果这样 这不不能用了
回复 支持 反对

使用道具 举报

发表于 2006-11-14 13:39:51 | 显示全部楼层
我用FC6光盘安装的系统,然后用光盘做yum源,应该不存在yum版本问题,但出现的错误和楼上相同,关注中。。。。
回复 支持 反对

使用道具 举报

发表于 2006-11-14 13:56:30 | 显示全部楼层
我也遇到这样的问题,解决办法如下:
step1:创建目录
mkdir /repo
mkdir /mnt/fc6_dvd

step2:加载ISO
mount -r -o loop /path/to/DVD-ISO /mnt/fc6_dvd

step3:建立链接
ln /mnt/fc6_dvd/Fedora /repo/Fedora -s

step4:创建repo
cd /repo
mkdir repodata
cp /mnt/fc6_dvd/epodata/comps.xml  repodata/comps.xml
createrepo -g repodata/comps.xml  .
(注意:即将DVD上的comps.xml文件复制到/repo/repodata,如果没有安装craaterepo就用yum装一个)

step5:修改/etc/yum.repo.d/iso.repo
我的iso.repo文件如下:
  1. [iso]
  2. name=iso
  3. baseurl=file:///repo
  4. enabled=1
复制代码

step6:清除cache
rm /var/cache/yum/iso/ -R -f

好了,完成了。
回复 支持 反对

使用道具 举报

发表于 2006-11-14 20:54:52 | 显示全部楼层
按照楼上的发放得到如下错误提示

Cannot open/read repomd.xml file for repository: iso

另外很想知道


step3:建立链接
ln /mnt/fc6_dvd/Fedora /repo/Fedora -s

这步有什么特别的意图?只是建立个连接?

为什么不在ISO里面直接写

[iso]
name=iso
baseurl=file:///mnt/fc6_dvd/Fedora
enabled=1
回复 支持 反对

使用道具 举报

发表于 2006-11-14 22:24:00 | 显示全部楼层
Cannot open/read repomd.xml file for repository: iso
应该是你没有执行step4的:
  1. createrepo -g repodata/comps.xml .
复制代码
yum程序读取的repomd.xml应该是用createrepo生成的。
建连接(ln /mnt/fc6_dvd/Fedora /repo/Fedora -s)的目的就是为了生成它,因为挂载上的ISO文件是不可写的。
回复 支持 反对

使用道具 举报

发表于 2006-11-15 08:52:01 | 显示全部楼层
我的方法,已经把光盘拷贝到硬盘上了,并且加载了所在分区所以掠过了1-3步,然后在/mnt/WinD/linux/ 目录下执行了

createrepo -g repodata/comps.xml .

继续第五步操作,产生了如上问题,等下我在测试下吧。看看是不是操作的时候出了什么问题。
回复 支持 反对

使用道具 举报

发表于 2006-11-15 15:45:14 | 显示全部楼层
Just pay attation to the directory hierarchy.
回复 支持 反对

使用道具 举报

发表于 2006-11-15 17:25:35 | 显示全部楼层
解决了没有呀。希望高手解决下。
回复 支持 反对

使用道具 举报

发表于 2007-2-25 10:24:33 | 显示全部楼层
顶一下,正解,如果需要使用Add/Remove Software (pirut)必须再加下面步骤:

Using Add/Remove Software With No Network Connection
If you want to use the Add/Remove Software application (pirut) with no network connection, you'll need to disable all of the yum repositories apart from your local one. By default, the only enabled repositories are core (which is now served by your local repository), updates, and extras. You can disable these repositories by changing the line enabled=1 to enabled=0 in /etc/yum.repos.d/fedora-updates.repo and /etc/yum.repos.d/fedora-extras.repo respectively.
If at a later time you have an Internet connection available and would like to update your system or install something from Fedora Extras, you can enable these repositories on the yum command line without needing to edit the .repo files again, e.g.:
# yum --enablerepo=updates --enablerepo=extras update
# yum --enablerepo=updates --enablerepo=extras install somepackage
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表