yum update [Errno -3] Error performing checksum

Recently I had this issue of checksum error while doing yum update in my RHEL5 servers.

# yum update
Loaded plugins: security
rhel5-local/primary_db                                                                                                                          |    0 B     00:00 [Errno -3] Error performing checksum
Trying other mirror.
Error: failure: repodata/c7408a1fce29f12df452017556509b3a3ebde95d7d01e8ea0adb052f97c43e86-primary.sqlite.bz2 from rhel5-local: [Errno 256] No more mirrors to try.

The usaual following way didn't work for me:

# yum clean all
# yum clean metadata
# yum update

Further I have disabled fastmirror for my yum config and it didn't work as well:

# grep enabled /etc/yum/pluginconf.d/fastestmirror.conf

I've even disabled http cache in yum.conf but same error:

# cat /etc/yum.conf |grep http_caching

Rebuilding rpm database also was not not helpful:

# rm -rf /var/lib/rpm/__db*
# rpm --rebuilddb
# yum update

But here was my situation, I've created local yum repository for RHEL 5 on my RHEL 6 server!

When reading the createrepo manual, we can see:

# man createrepo
 -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".

Which was exactly my problem. while creating repositoy for RHEL 5 servers in RHEL 6 server, createrepo command used new hash of SHA256, and it's not comaptible with yum of RHEL 5 and before:

To use createrepo with "-s sha" option in the repo server:

# createrepo -d -s sha /var/ftp/pub/LocalYumRepoRHEL5.1/

and in the client side:

# yum clean all
# yum clean metadata
# yum update

and there issue settled.


Popular posts from this blog

Running Docker Wildfly/JBoss Application Server in Debug mode via Eclipse

Foreman fresh installation issue on Foreman proxy

Building RPM OpenSSH 7.1p1 on RHEL/CentOS 6.5