CentOS 7.0 yum install 錯誤http://vault.centos.org/centos/7/os/Source/repodata/repomd.xml: [Errno 14]

執行yum install vconfig時老是報錯:

http://vault.centos.org/centos/7/os/Source/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

經過分析:

原因是標準的CentOS 7.0 Build1406裏面很多的倉庫已經被CentOS移除了,轉到CentOS 7.1 Build1503和CentOS7.2 Build1503了。

因此需要手工更改倉庫文件/etc/yum.d.repo/CentOS-Sources.repo,

更改之前,先備份下

#cp CentOS-Sources.repo CentOS-Sources.repo.bak

然後開始編輯CentOS-Sources.repo文件。

將文件中的“$releasever”全部替換成“7.2.1511”或者“7.1.1503”。

[base-source]
name=CentOS-7.2.1511 - Base Sources
baseurl=http://vault.centos.org/centos/7.2.1511/os/Source/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates-source]
name=CentOS-7.2.1511 - Updates Sources
baseurl=http://vault.centos.org/centos/7.2.1511/updates/Source/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras-source]
name=CentOS-7.2.1511 - Extras Sources
baseurl=http://vault.centos.org/centos/7.2.1511/extras/Source/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus-source]
name=CentOS-7.2.1511 - Plus Sources
baseurl=http://vault.centos.org/centos/7.2.1511/centosplus/Source/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

 

更改完成後執行

#yum clean

#yum update

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章