yum: Cannot open/read repomd.xml (c6-media)

[Problem]

在CentOS用yum安裝某套件時,出現下列的錯誤訊息:
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

[Solution]

問題出在yum會搜尋CentOS安裝光碟的套件訊息,可依下列步驟停用光碟套件搜尋。
  1. 編輯yum設定檔
    $ vi /etc/yum.repos.d/CentOS-Media.repo
    
  2. 搜尋[c6-media]區塊
    [c6-media]
    name=CentOS-$releasever - Media
    baseurl=file:///media/CentOS/
    file:///media/cdrom/
    file:///media/cdrecorder/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    
  3. 修改設定
    enabled=1 --> enabled=0
    
文章分類 系統管理 標籤: ,

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

*