本文介绍了从 RPM 中提取文件时出错 (rpm2cpio)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下命令从 RPM 包中提取单个文件.

I'm using the following command to extract a single file from RPM package.

 pm2cpio <RPM_NAME> | cpio -ivdm <FILE_NAME>

它对我来说很好,但在一个系统 (RHEL5.9) 上,我收到此错误:

It works fine for me, but on one system (RHEL5.9), I'm getting this error:

 cpio: premature end of file

我用谷歌搜索过,但找不到任何合适的答案和解决方案.有人可以遇到此问题并提供帮助吗?

I've googled it but couldn't find any appropriate answer and solution.Can someone encountered this issue and can help?

谢谢!

推荐答案

这个问题在 Redhat Bugzilla 项 rpm2cpio 在 rhel-6 rpms 上失败 并包含类似于以下内容的快速修复,这需要安装 xz 包:>

This problem is mentioned in the Redhat Bugzilla item rpm2cpio fails on rhel-6 rpms and includes a quick fix similar to the following, which requires that the xz package is installed:

rpm2cpio foo.rpm | xzcat | cpio -idmv

这篇关于从 RPM 中提取文件时出错 (rpm2cpio)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 00:26