Tuesday, May 22, 2012

Fix: "Cannot retrieve repository metadata" for Yum

# yum provides system-config-network
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.vr-zone.com
 * extras: centos.vr-zone.com
 * updates: centosz4.centos.org
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
This problem can be fixed by uncommenting 'baseurl' in repository configuration file. For example: File:CentOS-Base.repo Original:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
..
..
..
Change to:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
..
..
..
If this doesn't solve the problem, then it is something to do with network connection.

0 comments:

Post a Comment