linux系统

rpmlib(FileDigests),rpmlib(PayloadIsXz) is needed解决办法

在RHEL6中,新版的rpm使用了新的file digest algorithms 和 compression algorithms,所以当在RHEL6或centos6环境下编译RHEL5或centos5下使用的rpm包时,就会出现类似如下的错误

     rpmlib(FileDigests) <= 4.6.0-1 is needed by package-23488-1.noarch

     rpmlib(PayloadIsXz) <= 5.2-1 is needed by package-23488-1.noarch

查到解决办法如下

1,编辑/usr/lib/rpm/macros文件

#%_source_payload       w9.gzdio
#%_binary_payload       w9.gzdio

查找到上面这两行,将注释去掉改成

%_source_payload       w9.gzdio
%_binary_payload       w9.gzdio

2, 编辑/usr/lib/rpm/redhat/macros文件

%_source_filedigest_algorithm 8
%_binary_filedigest_algorithm 8

找到上面这两行,将其注释后变为

#%_source_filedigest_algorithm 8
#%_binary_filedigest_algorithm 8

然后找到如下这行

%_binary_payload w2.xzdio

将其注释后变为

#%_binary_payload w2.xzdio

依照上面两步进行修改后,在centos6或RHEL6下进行编译的RHEL5或centos5的rpm包,就可以很顺利的在RHEL5或centos5下安装了。

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *