# CentOS-Media.repo # # This repo is used to mount the default locations for a CDROM / DVD on # CentOS-5. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c5-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=\* --enablerepo=c5-media [command] [c5-media] name=CentOS-$releasever - Media baseurl=file:///media/CentOS/
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile file:///media/CentOS/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/media/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
搜索后,有教程說要配置createrepo,安裝后執行 createrepo -g /media/repodata/repomd.xml /media/CentOS/命令,建立包依賴關係庫,但報錯Directory /media/CentOS must be writable. 可是/media/CentOS是光碟本身的目錄,是只讀的,不能改屬性吧,但改變目錄,如執行:createrepo -g /media/repodata/repomd.xml /root,就不報錯,但仍然無法yum安裝,不知道問題在哪裡了