yumでrpmlib(FileDigests) is needed、rpmlib(PayloadIsXz) is neededが出る。

MySQLを5.6にアップデートしようと、Download MySQL Yum Repositoryから取得したrpmファイルをyum localinstall しようとすると次のエラーが発生した。

ERROR with rpm_check_debug vs depsolve:
rpmlib(FileDigests) is needed by mysql-community-release-el6-5.noarch
rpmlib(PayloadIsXz) is needed by mysql-community-release-el6-5.noarch

以下、yum localinstall mysql-community-release-el6-5.noarch.rpmの結果。

# yum localinstall mysql-community-release-el6-5.noarch.rpm
Loaded plugins: fastestmirror
Repository 'vz-base' is missing name in configuration, using id
Repository 'vz-updates' is missing name in configuration, using id
Setting up Local Package Process
Examining mysql-community-release-el6-5.noarch.rpm: mysql-community-release-el6-5.noarch
Marking mysql-community-release-el6-5.noarch.rpm to be installed
Loading mirror speeds from cached hostfile
 * addons: ftp.iij.ad.jp
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-release.noarch 0:el6-5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================
 Package                                    Arch                      Version                    Repository                                                Size
================================================================================================================================================================
Installing:
 mysql-community-release                    noarch                    el6-5                      /mysql-community-release-el6-5.noarch                    4.3 k

Transaction Summary
================================================================================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total size: 4.3 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
rpmlib(FileDigests) is needed by mysql-community-release-el6-5.noarch
rpmlib(PayloadIsXz) is needed by mysql-community-release-el6-5.noarch
Complete!
(1, [u'Please report this error in http://yum.baseurl.org/report'])

原因は

Download MySQL Yum RepositoryからダウンロードしたrpmがOSのバージョンと異なっていたため。CentOS 5.4 に6系のrpmをインストールしようとしていた。

#  cat /etc/redhat-release
CentOS release 5.4 (Final)

5系のrpmをインストールすると正常にインストールできた。

#  yum localinstall mysql-community-release-el5-5.noarch.rpm
Loaded plugins: fastestmirror
Repository 'vz-base' is missing name in configuration, using id
Repository 'vz-updates' is missing name in configuration, using id
Setting up Local Package Process
Examining mysql-community-release-el5-5.noarch.rpm: mysql-community-release-el5-5.noarch
Marking mysql-community-release-el5-5.noarch.rpm to be installed
Loading mirror speeds from cached hostfile
 * addons: ftp.iij.ad.jp
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-release.noarch 0:el5-5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================
 Package                                    Arch                      Version                    Repository                                                Size
================================================================================================================================================================
Installing:
 mysql-community-release                    noarch                    el5-5                      /mysql-community-release-el5-5.noarch                    3.5 k

Transaction Summary
================================================================================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total size: 3.5 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mysql-community-release                                                                                                                  1/1

Installed:
  mysql-community-release.noarch 0:el5-5

Complete!