Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 1.7 MB 02:25
http://www.mirrorservice.org/sites/apt.sw.be/redhat/el4/en/i386/dag/repodata/primary.xml.gz:
[Errno -1]
Metadata file does not match checksum Trying other mirror.
To reduce load, download.fedora.redhat.com (official host) contains the ~1kB checksum for the metadata. The metadata (usually ~1 - 2 MB) is downloaded off mirrors. After downloading metadata, Yum compares the two to make sure they're one and the same.
Now, think of this: download.fedora.redhat.com updates their metadata and checksums, so you're getting the new checksum. The mirror's cronjobs havn't gone yet, therefore no synching and the metadata isn't the newest, it doesn't match.
The solution is not to makecache; Although it may help it will take forever and still not 100% solve the problem. The main problem is not giving the mirrors enough synch time. Typically, cron runs every hour, and give it a bit of time to download the changes, so I'd say try running maybe 10 minutes after an hour and you'll have no problem (eg 3:10, 4:10, 5:10, etc...). If you get closer to :50 (3:50, :50, etc) you'll start seeing more syncing issues.
Again, this too isn't 100% perfect but more of a guideline. There's a lot of guesswork...
大概的意思是说:
引用
当 生成metadata数据的时候,会一同产生校验数据。而传输的时候,会用该校验数据判断metadata是否完整。这时候就会产生一个问 题,mirror镜像当从源网络拷贝数据回来时,下载了metadata,但还没下载校验数据(或由定时任务产生校验数据,但这时定时任务还没有执行)。 这时,如果刚好你正使用yum从该镜像更新,就会发生
Metadata file does not match checksum的问题了。
文中提供的解决方法是,根据大部分的镜像都是每小时进行一次数据同步或生成校验数据的,所以,不要选择接近整点的时候更新数据,而应选择整点过后再更新。但这只是建议,不能保证一定能解决该问题。