1

I have CentOS 6.6 running on VirtualBox w/ NAT. I am behind a proxy and have configured my proxy settings; the virtual machine is talking just fine to the internet.

When I attempt to install anything via yum, or do a yum update, I receive the following error:

# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Determining fastest mirrors
epel/metalink                  | 6.0 kB 00:00
 * epel: dl.fedoraproject.org
 * extras: linux.cc.lehigh.edu
 * updates: centos.sonn.com
base                           | 3.7 kB 00:00
base/primary_db                | 4.6 MB 00:00
file:///var/ftp/pub/repos/OS/CentOS/6.6/x86_64/os/repodata/repomd.xml: [Errno 14] Could not open/read file:///var/ftp/pub/repos/OS/CentOS/6.6/x86_64/os/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: centos-base.  Please verify its path and try again 

The path in /var/ftp/... didn't exist, so I created it but the only change is that the error switches from being a file access error to an error saying that the repomd.xml file is damaged. If I try to yum install <package> where I --disablerepo=<every repo except epel>, it succeeds.

Anybody have an idea of what's happening here?

2

Your CentOS was configured with a local repo. You'll have to edit your repositories in /etc/yum.repos.d. Here is a sample for /etc/yum.repos.d/CentOS-bas.repo

| improve this answer | |
1

Clean up the metadata files (all of the repomd.xml files):

# yum clean metadata

and try again. It also looks like at one time you may have made a local copy of the packages in /var/ftp. Check your /etc/yum.repos.d/CentOS-Base.repo file to confirm it's looking to the Internet for packages. The file should have something like this for at least [base] and [updates]:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.cc.ltgc.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Note that the mirrorlist line in not commented.

| improve this answer | |
  • I've tried cleaning up the metadata; no luck. My CentOS-Base.repo file looks exactly like your sample above, but it is still looking locally for the repo. Is there maybe a more global configuration that is overriding the repo settings? – J.B Aug 5 '15 at 19:55
  • Check /etc/CentOS-Media.repo. Confirm the enabled line has "enabled=0". – Ben Aug 5 '15 at 20:14
  • Yes, it has "enabled=0". – J.B Aug 5 '15 at 20:31
0

Thanks to the other posters for giving me the heads up that it was looking for a local repository; it turns out the EPEL repo configuration was (for some reason) set up to override the centos-base repo configuration with a local file path. I removed this and now everything works fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.