1

I have tried absolutely everything, without good results...

yum always fails with "sqlite.bz2 File does not match checksum" for different repositories, every single time, but always with the above error.

ive tried setting ... * http_proxy * http_caching * disabling fastestmirror * changing settings in sysctl.conf

all with the same result,

Im starting to think it might be a bug?...related to http://bugs.centos.org/view.php?id=5116

DPI
  • 11
  • 2

2 Answers2

2

As ive read this on another website while searching for the answer to this. The OP states 'different repositories', so it matches my difficulties as well, trying to install centos 6.2 in a directory on redhat 5.3.

The thing is that the python version of different release is different.

Python 2.6 uses hashlib to perform checksums, and Python 2.4 uses the SHA module to perform checksums. The version of the SHA module that ships with CentOS 5.3 doesn’t support sha256, which is why we get the checksum error listed above

from : http://prefetch.net/blog/index.php/2009/11/26/dealing-with-yum-checksum-errors/

Riccardo B.
  • 131
  • 4
1

The version of yum on CentOS 5 does not support the default checksum method used by CentOS 6. If you are trying to install from a repository that you control you may regenerate the repository meta information with the createrepo command, using the --checksum "sha" option. From the createrepo man page:

-s --checksum Choose the checksum type used in repomd.xml and for packages in the metadata. The default is now "sha256" (if python has hashlib). The older default was "sha", which is actually "sha1", however explicitly using "sha1" doesnât work on older (3.0.x) versions of yum, you need to specify "sha".

Dave Forgac
  • 3,546
  • 7
  • 37
  • 48