LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Prob with yum: [Errno -1] Metadata file does not match checksum Trying other mirro (https://www.linuxquestions.org/questions/fedora-35/prob-with-yum-%5Berrno-1%5D-metadata-file-does-not-match-checksum-trying-other-mirro-462093/)

tor_user 07-08-2006 10:50 AM

Prob with yum: [Errno -1] Metadata file does not match checksum Trying other mirro
 
I am posting this because one day yum decided to break down on me, and everything else that I tried from Googling the web failed.

One night I was in the middle of a yum install when I pressed control-C to abort. Ever since then, yum became terribly confused and refused to work any longer: ALL of my repositories returned the following error message:

[Errno -1] Metadata file does not match checksum

I tried all the usual suggestions: yum clean all, yum clean metadata, yum update. I tried entirely deleting the yum cache directories. I tried rebooting. Nothing worked.

I went into the one of the yum cache directories and noticed that even when I clear out the entire directory and download the new information - including the repomd.xml file and primary.xml.gz file, the 'repomd.xml' file was actually date stamped from two weeks earlier.

I opened up repomd.xml and looked at the hash value for the primary.xml.gz file. I then computed a hash in primary.xml.gz using sha1sum. They didn't match.

Hence, I figured that my ISP was serving an older cached version of the repomd.xml file which was out of date and therefore the checksums didn't match.

I went onto IRC and someone kindly suggested doing this: Explicitly export a variable in bash which contains the IP address of your http proxy. So, I went into bash and did something like:

export http_proxy=[full http address here]

(I had to edit that because the forum wouldn't allow me to post an example URL - just be sure to indicate the http protocol and include the port number after the IP using a colon).

where that IP address was the IP address of my proxy (which I obtained from doing an 'env check' at cybersyndrome.net.

Which showed my 'REMOTE_ADDR' (the IP of my proxy - as opposed to 'HTTP_FORWARDED_FOR' which is the IP of my computer)

Anyway, I exported that variable, and yum started working again. I guess it must have been a problem with my ISP's cache servers. I'm sure they would have fixed it eventually, but this was a useful fix in the meantime.

I hope this is of some use to someone who is pulling their hair out about yum after trying everything else out there on the web. :)

Good luck.

jdwilder 07-08-2006 12:09 PM

I have heard that some people are having this problem when using fastestmirror detection.
supposedly it will get fixed if you
yum -y remove yum-fastestmirror

(However I am not sure how that will work if your yum isn't working)

just a thought, maybe something you haven't tried yet

stormtracknole 07-09-2006 12:51 AM

I have had that problem before. Just do yum clean metadata from the command line. That should take care of it. Not sure why it does that.

wakes 07-17-2006 04:34 AM

I too had the problem after breaking out of yum.

I tried all the above but no luck so then grabbed an (older) copy of the rpms from another computer which had the original install mounted and did a yum localinstall <rpm>

This failed due to a dependency error (doh!), but from then on yum seemed to work fine grabbing from the online repositories.

Hope this helps.
Steve

Renifer 09-05-2006 01:20 AM

Quote:

Originally Posted by jdwilder
I have heard that some people are having this problem when using fastestmirror detection.
supposedly it will get fixed if you
yum -y remove yum-fastestmirror

(However I am not sure how that will work if your yum isn't working)

just a thought, maybe something you haven't tried yet

I had the same problem listed here.
I found that for me, a combination of removing fastestmirror and yum clean metadata resolved the problem.
Performing a yum clean all and yum clean metadata did not get results. I had to also remove fastestmirror as well.
I noticed that fastestmirror caches, and I wonder if that affects things if you halt [CTL Z] the yum process.
I have decided not to use it.

Code:

[root@localhost ]# yum clean all
Loading "installonlyn" plugin
Cleaning up Everything
0 headers removed
0 packages removed
16 metadata files removed
0 cache files removed
6 cache files removed  <--  ??

Thanks to all of you who posted answers.
This helped me, and it only took ten minutes.

eudmian 09-26-2006 01:03 AM

Thx jdwilder
 
I found jdwilders:

Code:

yum -y remove yum-fastestmirror
worked for me first try...thx

FC5 & MythTV

jtmoon 02-03-2007 05:16 AM

I had the same problem:
Code:

$ yum install fuse-utils
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core                                                                [1/8]
core                      100% |=========================| 1.1 kB    00:00
gst-0.10-apps                                                        [2/8]
gst-0.10-apps            100% |=========================|  951 B    00:00
updates                                                              [3/8]
updates                  100% |=========================| 1.2 kB    00:00
freshrpms                                                            [4/8]
freshrpms                100% |=========================|  951 B    00:00
xcyb-stable                                                          [5/8]
xcyb-stable              100% |=========================|  951 B    00:00
gst-0.10-deps                                                        [6/8]
gst-0.10-deps            100% |=========================|  951 B    00:00
extras                                                              [7/8]
extras                    100% |=========================| 1.1 kB    00:00
gst-0.10-gst                                                        [8/8]
gst-0.10-gst              100% |=========================|  951 B    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 544 kB    00:30
http://srl.cs.jhu.edu/YUM/fedora/extras/5/i386/repodata/primary.xml.gz: [Errno 4] Socket Error: timed out
Trying other mirror.
primary.xml.gz                                                  1.9 MB 00:04
ftp://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/extras/5/i386/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
primary.xml.gz            100% |=========================| 1.9 MB    00:04
ftp://fedora.mirrors.tds.net/pub/fedora-core-extras/5/i386/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
primary.xml.gz            100% |=========================| 1.9 MB    00:02
http://download.fedora.redhat.com/pub/fedora/linux/extras/5/i386/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
primary.xml.gz            100% |=========================| 1.9 MB    00:14
http://mirror.pacific.net.au/linux/fedora/linux/extras/5/i386/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
primary.xml.gz            100% |=========================| 1.9 MB    01:08
http://mirror.linux.duke.edu/pub/fedora/linux/extras/5/i386/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
http://sunsite.mff.cuni.cz/pub/fedora-extras/5/i386/repodata/primary.xml.gz: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
primary.xml.gz            100% |=========================| 1.9 MB    00:08
http://mirror.aarnet.edu.au/pub/fedora/linux/extras/5/i386/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
...

And this command worked:
Code:

yum clean metadata
I would recommend doing the above clean procedure before changing yum's configuration settings.
In other words, try the above command first then secondly try this command:
Code:

yum -y remove yum-fastestmirror
-J Tom Moon 79

sihtworth 07-20-2007 06:56 AM

I am suffering the same problem
 
I am suffering the same problem (with CentOS 4):

[root@linux16 tteswz]# yum update
Setting up Update Process
Setting up repositories
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 19 kB 00:00
http://mirror.centos.org/centos/4/up...rimary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.xml.gz from update: [Errno 256] No more mirrors to try.

I have tried all of the following:

1. yum clean all and yum clean metadata
2. yum -y remove yum-fastestmirror
3. export http_proxy=[my actual proxy server]

The only suggestion here that I haven't tried is wakes' of getting rpms manually and doing a localinstall but that's because I don't have these to hand and would not know where to start when it comes downloading them individually.

Anyone got any ideas?

Thanks

Stewart

BHG_2008 09-10-2008 11:07 AM

Yum with Proxy
 
If you use the "export http_proxy=[full http address here]" from above post, you MUST include the following in your /etc/yum.conf:
proxy=[ip address:port]
This did not appear as an issue until I upgraded yum to 3.2.8.
This occurred on CentOS 5. The previous yum version did not seem to have issue.

BHG_2008 09-10-2008 12:30 PM

Disabling the fastestmirror yum plugin
 
While this plugin occasionally causes metadata/checksum issues, it is still valuable for speeding up updates.

Instead of "yum -y remove yum-fastestmirror", do the following:
yum makecache --disableplugin=fastestmirror
yum update []

This allows you to continue using the plugin and work around it, instead of just blowing it away.
(CentOS 5.2 is environment, your paths may differ.)

bday 10-27-2008 01:34 AM

Similar issue with a repository on a local HD & *not* online!
 
G'day all

First - please note I am on dial-up .. which will 'explain' a few things in the following...


I had the same "checksum" problem after rebuilding my local repository with "createrepo -d" .... tho' I was not online at the time!!
(Yes, I have to keep all my downloads! :-))

Having read the various posts and replies, I suspect it was the cached metadata that was really causing the problem, tho' there was nothing for yum(ex) to actually fetch from the net - as it was all on a HD !!


So.. to my question(s) ... :-))

(1) Is there a way to force the rebuild of the cached metadata as (BHG_2008 suggested) - *but* avoiding the (re)fetching of data from the various online repositories? (...I'm on dial-up remember)
ie: just so I can rebuild the cached metadata relevant to my local repo on HD, if this should happen again?

...or (2) does it always (need to) rebuild the cache for *all* repositories regardless of whether it is from a local HD or from an online source?
(..I do hope not ... this would really be a nuisance!)
If it is so...(3) what would happen if I did a "yum makecache" when *not* online? Would it then stuff up the cached metadata completely (for the (unavailable) online repositories)?

NB: I have rebuilt the local HD repo quite a few times previously - without any issues ... It makes you wonder why ditching or disabling the fastest-mirror plugin is (suddenly) relevant .. tho' it does seem to be so.

It does tend to suggest there is a bug lurking in the fastest-mirror plugin somewhere...... (4) Any ideas where?

Many thanks
Barry Day

gnuzilla 01-15-2009 02:21 PM

i was able to relive the problem also,
 
thank for the advice, i was able to relive the probelem and keep fastmirror yum plugin

i ran these commands

Code:

yum clean all
yum clean metadata


then i was all cool
BTW i'm running RHEL 5.2 x86_64

whistl 04-03-2009 02:47 PM

I found that running the "yum -y remove yum-fastestmirror" removed "yum" based on depedancies on my CentOS 5.2 x86_64 server! Doh!

It was easier to run "vi /etc/yum/pluginconf.d/fastestmirror.conf" and set "enable=0"

chrism01 04-04-2009 07:27 PM

@bday:

1. if the system seems corrupt, you can try rpm --rebuilddb, as yum is a layer over rpm. This rebuilds the local rpm db based on what you've got installed. Not often reqd unless you ctrl-c or crash during an rpm op.

2. from the man page, it seems pretty clear that yum makecache updates the local cache against all the repos you've got registered. That's its reason for existing... You could temporarily move repo definition files somewhere else for non-local repos and do yum makecache.

Viet 10-23-2009 03:23 PM

I agree with Whistl. The command "yum -y remove yum-fastestmirror" is dangerous and should not be used as it could un-install some of your working applications. I learned it the hard way...


All times are GMT -5. The time now is 10:55 PM.