Linux – Cannot get CentOS 5 to update – Yum Errors

centos5linuxyum

I'm used to Yum on CentOS 5 being a total pig and breaking every other week, but until now I've always been able to fix the problem by simply running:

yum clean all

And then updating normally.

Not working today. I did a lot of googling, and another common piece of advice was to disable fastmirror, tried that too, still to no avail. Here is the error I'm getting:

# yum update
addons                                                                               |  951 B     00:00     
addons/primary                                                                       |  204 B     00:00     
base                                                                                 | 2.1 kB     00:00     
base/primary_db                                                                      | 2.2 MB     00:00     
extras                                                                               | 2.1 kB     00:00     
extras/primary_db                                                                    | 244 kB     00:00     
spacewalk-client-tools                                                               | 1.9 kB     00:00     
spacewalk-client-tools/primary_db                                                    |  15 kB     00:00     
updates                                                                              | 1.9 kB     00:00     
updates/primary_db                                                                   | 603 kB     00:00     
http://ftp.heanet.ie/pub/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.as29550.net/mirror.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.melbourne.co.uk/sites/ftp.centos.org/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.ellogroup.com/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.netrino.co.uk/mirror.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.coreix.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.krystal.co.uk/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.ukfast.co.uk/sites/ftp.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://anorien.csc.warwick.ac.uk/mirrors/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.ox.ac.uk/sites/mirror.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.bytemark.co.uk/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/CentOS/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.denit.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.oxilion.nl/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://ftp.tudelft.nl/centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.widexs.nl/ftp/pub/os/Linux/distr/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.nl.leaseweb.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.supportex.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://centos.mirror.evertje.net/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://nl.mirror.eurid.eu/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://ftp.heanet.ie/pub/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.as29550.net/mirror.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.melbourne.co.uk/sites/ftp.centos.org/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.ellogroup.com/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.netrino.co.uk/mirror.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.coreix.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.krystal.co.uk/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.ukfast.co.uk/sites/ftp.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://anorien.csc.warwick.ac.uk/mirrors/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.ox.ac.uk/sites/mirror.centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.bytemark.co.uk/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/CentOS/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.denit.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.oxilion.nl/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://ftp.tudelft.nl/centos.org/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.widexs.nl/ftp/pub/os/Linux/distr/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirror.nl.leaseweb.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://mirrors.supportex.net/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://centos.mirror.evertje.net/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                   | 603 kB     00:00     
http://nl.mirror.eurid.eu/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.sqlite.bz2 from updates: [Errno 256] No more mirrors to try.
#

Is it possible that every yum mirror being tried has a dead sqlite package? Is there a way to tell yum to ignore sqlite and just update the rest? I tried –skip-broken, but it still errored out with the identical error.

CentOS is so broken these days 🙁

Bart.

Best Answer

I checked http://nl.mirror.eurid.eu/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2 and the mirror looks OK.

To check I manually pulled down the file:

wget http://nl.mirror.eurid.eu/centos/5.6/updates/x86_64/repodata/primary.sqlite.bz2

Run sha1sum on it:

$ sha1sum primary.sqlite.bz2 
0c3f80f4063c9e64c000c5e6f1e5bda0a0623822  primary.sqlite.bz2

$ bzip2 -d primary.sqlite.bz2
$ sha1sum primary.sqlite 
adda574a8d795705b80d6c2003947c1ae2797f5f  primary.sqlite

and checked these values against the values listed in http://nl.mirror.eurid.eu/centos/5.6/updates/x86_64/repodata/repomd.xml

<data type="primary_db"><location href="repodata/primary.sqlite.bz2"/>
  <checksum type="sha">0c3f80f4063c9e64c000c5e6f1e5bda0a0623822</checksum>
  <timestamp>1307575563</timestamp>
  <open-checksum type="sha">adda574a8d795705b80d6c2003947c1ae2797f5f</open-checksum>
  <database_version>10</database_version>
</data>

Try a yum clean all and check that the files in /var/cache/yum/... in the same manner.