Article ID: 3464, created on Feb 20, 2012, last review on May 3, 2014

  • Applies to:
  • Virtuozzo containers for Linux

Symptoms

在为CentOS 5操作系统模板创建缓存时出现一个错误 'Package does not match checksum / 软件包与校验和不匹配'  类似如下:
Downloading Packages:
(1/2): perl-5.8.8-10.i386 100% |=========================|
http://mirror.centos.org/centos/5/os/x86_64/CentOS/perl-5.8.8-10.i386.rpm:
[Errno -1] Package does not match checksum
Trying other mirror.
(2/2): basesystem-8.0-5.1 100% |=========================|
http://mirror.centos.org/centos/5/os/x86_64/CentOS/basesystem-8.0-5.1.1.el5.centos.noarch.rpm:
[Errno -1] Package does not match checksum
Trying other mirror.
Error Downloading Packages:
perl - 4:5.8.8-10.i386: failure: CentOS/perl-5.8.8-10.i386.rpm from base0: [Errno 256]
No more mirrors to try.
basesystem - 8.0-5.1.1.el5.centos.noarch: failure: CentOS/basesystem-8.0-5.1.1.el5.centos.noarch.rpm from base0: [Errno 256]
No more mirrors to try.
ERROR: yum exited with code 1

Cause

CentOS 更新了他们的软件仓库结构(repository structure),所导致的结果是CentOS 5操作系统模板的元数据仓库(repository metadata) 无效.

Resolution

万一在硬件节点上安装了非常陈旧的 EZ templates , 在任何下一个行动之前,请执行 'vzup2date -z'  命令,进而下载最新版本的 EZ templates.

请为受影响的操作系统模板清除元数据库(repository metadata),  在那之后再移除旧的缓存并创建新的操作系统模板缓存:

对于32位CentOS 5 操作系统模板:
# vzpkg clean centos-5-x86
# vzpkg remove cache centos-5-x86
# vzpkg create cache centos-5-x86


对于64位CentOS 5 操作系统模板:
# vzpkg clean centos-5-x86_64
# vzpkg remove cache centos-5-x86_64
# vzpkg create cache centos-5-x86_64

e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article