Prob with yum: [Errno -1] Metadata file does not match checksum
Trying other mirro
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have found that sometimes the upstream mirror has a corrupt metadata file, possibly caused by running buildrepo while files were still being updated or something like that. The only solution then seems to be to wait 4-24 hours and try again.
Another solution, and one I've since done, is to build your own repository. You just need a web server with ~5 GB free space per version+architecture combination you use, an upstream repo to mirror from (I asked and got permission from GA Tech) and a couple of shell scripts (there are links on centos.org you can read more about this). Then you just modify the /etc/yum.repos.d/CentOS-Base.repo file on each of your servers to point to your repo instead of using the default mirror list for the Base, Updates, Extras and Addons repos, and you're in charge of your own fate.
Updates and kickstarts go a LOT faster when you have your own repository. And if your bosses agree (mine didn't), you can give back to the community by making your repo available over the Internet to other users.
I know this thread is a bit old, but I just ran across it as I was searching for an answer and wanted to add to the collective knowledge of what worked for me.
It appears that this issue is likely to be caused by http caching on the server (repo) side. The reason that "yum clean all" won't fix the problem immediately is because yum will just download the cached out of date metadata file again. Until the repo http server's cache times out and caches the new metadata file, you'll keep getting the old metadata file and yum will keep complaining.
You can instruct yum not to use http caching, however. To do so globally, just add this option under the [main] section in /etc/yum.conf:
Code:
http_caching=none
Now run yum clean all and yum check-update and you should be good to go!
I haven't tested it, but I would assume that you could also specify this option at a repo level instead of globally if you prefer.
I tried all the previous options, including
-> vi /etc/yum/pluginconf.d/fastestmirror.conf & set enabled=0
-> yum clean all
-> rpm --rebuilddb
even the one with adverse side effects
-> yum -y remove yum-fastestmirror
The above command removed yum. I used the CD I used to install the OS, and the following commands to get it back
-> cd /media/CDROM/CentOS
-> rpm -Uvh yum-3.2.19*.rpm yum-fastestmirror-*.rpm
Finally, what worked was as you mention in your post.
-> vi /etc/yum.conf (add the line http_caching=none under section [main])
-> yum clean all
Last edited by illinux; 04-03-2012 at 07:56 AM.
Reason: removed all the unwanted "QUOTE" entries
I stumbled upon this thread while searching for "yum metadata file does not match checksum" online.
I would like to add some useful recon to this thread:
Root cause of problem:
I had a Scientific Linux 5.3 test server that I backed up to a local tar file, upgraded to 5.7 and then restored the backup to take it back down to 5.3 (testing rollback prior to patching production servers).
After rolling back to 5.3, I then reinitiated an upgrade and ran into this problem. yum returned the "metadata file does not match checksum" error.
Solution:
Code:
yum clean metadata
Following that, I was able to proceed with a full upgrade to 5.7 as normal.
Thank you, LinuxQuestions.org and its community, yet again, for hosting good information and showing up with high relevance in search results.
I'm writing my result here hoping to be able to help others. I got this same error while creating a Red Hat 5.9 YUM Repository on a Red Hat 6.3 server. The problem appears because 6.3 uses the SHA256 checksum by default when creating the primary.xml.gz file; and 5.9 uses the old SHA1.
My "yum update"-based upgrade from CentOS 5.8 to 5.9 was failing due to the issue above. Ramses's answer proved to solve this, as it was a local/custom repository failing its checksums what made the whole process to abort every time. Now I split my createrepo-based script in two according to the CentOS branch (5.x or 6.x) and all seems to work just fine now. Thanks !
I know this is a pretty old thread, but I came to it when I was researching this problem for myself. 'yum clean metadata' and 'yum clean all' did not fix the problem for me. Interestingly, though, simply running 'yum update' got everything back into order. This was with Fedora 19.
I know this is a pretty old thread, but I wanted to share the solution which worked for me.
I got the same error on a CentOS 5.8 box which was registered to a spacewalk server having the latest packages from CentOS 5.11 (and checksum as well). I found this link and is what did the magic for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.