2012年5月9日水曜日

[Errno -1] Metadata file does not match checksum

※this text from livedoor blog 2009/10/30

yumを使おうとして [Errno -1] Metadata file does not match checksum とのエラー表示

$ sudo yum install gcc-c++ httpd-devel httpd-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: ftp.jaist.ac.jp
 * base: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: ftp.jaist.ac.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.i386 0:4.1.2-46.el5 set to be updated
--> Processing Dependency: libstdc++-devel = 4.1.2-46.el5 for package: gcc-c++
---> Package httpd-devel.i386 0:2.2.3-31.el5.centos set to be updated
--> Processing Dependency: apr-util-devel for package: httpd-devel
--> Processing Dependency: apr-devel for package: httpd-devel
--> Running transaction check
---> Package apr-devel.i386 0:1.2.7-11.el5_3.1 set to be updated
---> Package apr-util-devel.i386 0:1.2.7-7.el5_3.2 set to be updated
--> Processing Dependency: openldap-devel for package: apr-util-devel
--> Processing Dependency: db4-devel for package: apr-util-devel
--> Processing Dependency: expat-devel for package: apr-util-devel
---> Package libstdc++-devel.i386 0:4.1.2-46.el5 set to be updated
rpmforge/filelists                                                                               | 3.8 MB     00:00    
http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/i386/rpmforge/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
rpmforge/filelists                                                                               | 3.8 MB     00:00    
http://fr2.rpmfind.net/linux/dag/redhat/el5/en/i386/rpmforge/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
http://apt.sw.be/redhat/el5/en/i386/rpmforge/repodata/filelists.xml.gz: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: failure: repodata/filelists.xml.gz from rpmforge: [Errno 256] No more mirrors to try.
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.


metadataをcleanして解決

$ sudo yum clean metadata
Loaded plugins: fastestmirror
24 metadata files removed
8 sqlite files removed
0 metadata files removed


リポジトリが壊れている場合は

$ sudo emacs cd /etc/yum.repos.d/****.repo
enabled=1

enabled=0