歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS 使用yum找不到索引文件問題

CentOS 使用yum找不到索引文件問題

日期:2017/2/28 15:49:04   编辑:Linux教程

今天在做實驗的時候安裝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下面的索引文件了~~~~

Copyright © Linux教程網 All Rights Reserved