EPEL primary.sqlite.bz2 404 Not Found errors

I recently had an epic battle with yum and the EPEL repository. I wasted enough
time on it that I think it will be useful if others experience similar problems.

The Problem

I recently installed a new VM with [CentOS 5.5 x86_64]. Like usual I add the EPEL
and IUS Community repositories so that I can have access to git 1.7, PHP 5.3,
MySQL 5.1, and Python 2.6 among other things. Everything was fine for 2 days until
I went to install a package today. A simple yum install php53u-gd resulted in a
wall of 404 error messages when it tried to fetch some cryptic bzipped file:

I tried repeatedly to clean the yum metadata and cache, even yum clean all a few times. The problem persisted.


My first step was to actually look at one of the mirrors returning 404 and verify that the file
truly wasn’t there. Sure enough, it wasn’t. I also noted that they had recently been updated on 09-Feb-2011.

centos mirror repodata

I checked several other mirrors that were 404’ing and saw the same thing. Where was my machine fetching
this information from? I asked around on IRC (#epel on freenode) and “nirik” suggested I try
URLGRABBER_DEBUG=1 yum update which gave me the following output:

Navigating to the ServerCentral EPEL mirror showed me the problem.

servercentral repodata

The bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76-primary.sqlite.bz2 was not here either, but what really caught my
eye was that the repo hadn’t been updated since 27-Jan-2011.

YUM keeps a cache of the EPEL RPM database and assorted metadata in /var/cache/yum/epel.
Checking this location on my system showed that I had the bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76-primary.sqlite.bz2
file present. I also checked the contents of repomd.xml and found the root cause:

Aha! Not only was the mirror out of date, but the repomd.xml was out of sync with the mirror itself.

The Solution

CentOS is configured to use the fastestmirror yum plugin by default. My machine had an affinity for the
ServerCentral mirror because it was the fastest. To fix this I simply edit /etc/yum/pluginconf.d/fastestmirror.conf
adding an exclude as shown:

Follow this up with a simple yum clean dbcache metadata and you’re golden!

9 Responses to EPEL primary.sqlite.bz2 404 Not Found errors

  1. Benkim April 11, 2013 at 01:53 #

    Thankx! this helps bunch

  2. Robert B. August 21, 2013 at 17:25 #

    I ran into the same problem with spacewalk repository updates. I’m not sure I have the option of excluding a particular server with spacewalk. Anyone have any ideas? And when mirror sites become stale, how long does it take for them to get thrown out or updated?


    • MaxMouse December 8, 2013 at 08:36 #

      Hi Robert, I had the same error on CentOS 6 when trying to install SpaceWalk as well. Just running “yum clean all” fixed it for me.

  3. MaD-MaX September 22, 2013 at 07:53 #

    Thanks Alot ! helped a lot

  4. Juan March 20, 2014 at 06:12 #


  5. Sunny Mok July 10, 2014 at 03:29 #

    Thanks! My exact situation and solution!

  6. Anthony August 18, 2014 at 13:22 #

    Just remove epel from yum and remove the epel directories in /etc/yum and it will work when you reinstall the epel rpm.

  7. Nick August 28, 2015 at 02:32 #

    it works, thanks


  1. Resolving EPEL 404 Errors in yum - June 8, 2015

    […] to do this once so far, I’m not treating it as a recurring issue yet. If it returns, though, David Abdemoulaie has a fix on his blog which I imagine would work, which involves explicitly excluding the mirror […]

Leave a Reply