CentOS 使用yum找不到索引文件问题


今天在做实验的时候安装bind-*软件,想弄个本地源安装,就照着RHEL的方式弄,结果出错了,想想CentOS和RHEL光盘文件rpm包存放文件夹的位置不同引起的问题,提示如下错误:

[root@Centos yum.repos.d]# yum install bind-*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
file:///mnt/CentOS/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/mnt/CentOS/repodata/repomd.xml'
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c5-media. Please verify its path and try again

因为我把光盘挂载在/mnt/下面,所以在配置/etc/yum.repos.d/CentOS-Media.repo本地源搜索文件的时候是把baseurl的路径指到/mnt/CentOS下面,结果就出错,后来一看/mnt下面有个repodata文件夹,里面有索引文件,就直接把baseurl改为/mnt就行了,这样就可以自动搜索到那个repodata下面的索引文件了~~~~

相关内容