How to fix yum [Errno -1] Metadata file does not match checksum


I recently upgraded my local yum repository server to RHEL6. After upgrading I noticed the below error when my el5 clients would attempting to install packages from the local repo with yum.


[Errno -1] Metadata file does not match checksum Trying other mirror

As it turns out the default checksum type was changed when upgrading to the newer version of createrepo available on my el6 system. The default was changed from sha to sha256 which causes an incompatability with the older rhel5 clients. Here’s an excerpt 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".

The fix lucikly was simple, I re-ran createrepo with the ‘–checksum sha’ option.


#Createrepo command compatible with older el5 systems

createrepo --checksum sha /path/to/repo

Then I ran a yum clean all on the client, just to be sure.


#clear cache on client system

yum clean all

And that’s it! My el6 yum repository is now happily serving both el5 and el6 clients.

5 Responses to “How to fix yum [Errno -1] Metadata file does not match checksum”

  1. VIKAS Says:

    Hello,

    This does not works in RHEL 5.10, only works till RHEL 5.9. Any idea how to make that work ?

    Regards,
    Vikas

    [Reply]

  2. Jack Dobson Says:

    Have you tried: yum clean metadata

    [Reply]

  3. Camilita Says:

    Thanks to you both!stefan, sorry for my absence, but there are vrouais reasons for it. First of all I got sick and have been loaded of work to do. Second, the project is going a road which doesn’t interest me too much. This doesn’t mean that I won’t give contribute. In fact, there are certain things I need to code anyway someday, so why don’t contribute to the reactos? However, right now I really don’t have the time for educational project, I’m really out of time and going through major crisis, which affect me through my family. If despite of this you’d like to talk to me, my msn contact is: .P.S. florent this applies to you to, of course. You can add me if you’d like to your contacts.

    [Reply]

  4. http://willysobsession.com Says:

    Well put, sir, well put. I’ll certainly make note of that.

    [Reply]

  5. http://www.liveatthekasbar.com Says:

    That kind of thinking shows you’re an expert

    [Reply]

Join the Conversation