今天给新装的CentOS升级,更新了CentOS-Base.repo以后,yum makecache生成缓存,总是失败,出现下面提示:
file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read
file:///media/CentOS/repodata/repomd.xml
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read
file:///media/cdrecorder/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read
file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its path and try again
我知道是CentOS-Media.repo这个文件出了问题但是不知道怎么解决,Google了一下,在这里 2楼找到了答案。
解决方法是:
只要把CentOS-Media.repo里面的enable=1改成enable=0即可,就是让这个文件失效吧。