Thursday, August 11, 2011

Gotcha of the Day: Dealing with Yum EPEL Errors

This morning, I was taking my own advice, and upgrading a backup solution I use on one of my servers to duplicity. In the past, this has been painless to do. The first step being:

 yum install duplicity

That command came back with the dreaded message:

 Warning: No matches found for: duplicity

Ugh. I'm still not 100% sure what repositories I should be pointing to, and how to set them up. And then it hits me, I should probably just install EPEL, as I know that's a trusted repository.

I run the rpm command recommended by the FAQ, and all goes well. I then go to install duplicity and run into this gem:

[ben@www ~]$ yum search duplicity
Loaded plugins: fastestmirror
Error: Cannot access repository dir //var/cache/yum/epel

Surprisingly, googling around for Error: Cannot access repository dir //var/cache/yum/epel didn't really return any useful results. A handful of people have seen this issue, but there was no explanation as to what was going on.

I tried installing other versions of EPEL, but that didn't help. I was just about to give up and build duplicity from source when I had a crazy idea. What if I upgraded yum itself? So I ran:

  sudo yum upgrade yum

Sure enough, yum came back to me and asked me if I indeed wanted to install yum. I did. I then re-installed EPEL:

   rpm -Uhv http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

And I was off and running! I was delighted that I could now do:

[xxx@www ~]$ yum search duplicity
 Loaded plugins: fastestmirror
 ================================= Matched: duplicity  
 duplicity.i386 : Encrypted bandwidth-efficient backup using rsync algorithm
 [xxx@www ~]$ 

The yum install of duplicity pulled in all the required packages, and within a few minutes, I had my first full backup running. In fact, in the time it took to write this blog post, over 3Gig of data has been safely backed up off site.

One day I'm going to fully understand what makes yum tick. In the mean time, I'm just going to be thankful when it does what I want.

No comments:

Post a Comment