rpm 构建错误
我尝试构建一个 rpm 包,但出现以下错误
- /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS 查找:无效谓词“” 错误:/var/tmp/rpm-tmp.86590 (%install) 的退出状态错误 可能是什么原因。任何人都可以帮助我吗...谢谢
I tried to build a rpm package which is giving me the following error
- /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS
find: invalid predicate `'
error: Bad exit status from /var/tmp/rpm-tmp.86590 (%install)
what could be the reason .can any one help me in this...Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试在规范文件中定义
BuildRoot
变量。 find-debuginfo 脚本会多次查找该目录,如果没有它就会死掉。这通常看起来像:
BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release}
至于你的第二个问题,我不能在没有看到规范文件的情况下说并直接获取来源,而且我绝不是 RPM 专家。我会向您推荐《Maximum RPM》第 13 章(可在线免费获取副本),以及 Tom Callaway 在 如何制作好的 RPM 包 - 我发现这里的规范示例在过去非常有帮助。
Try defining the
BuildRoot
variable in your spec file. The find-debuginfo script looks in to that directory several times, and will die without it.This will usually look something like:
BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release}
As to your second question, I can't say without seeing spec file and sources directly, and I am by no means an RPM expert. I will recommend you to Chapter 13 of Maximum RPM(there are copies available free online), and the notes from Tom Callaway's presentation on How to make good RPM packages - I've found the spec examples here to be very helpful in the past.
在您的规范中,您可以在顶部执行此操作:
这应该绕过此问题
In your spec you can do this at the top:
This should bypass this problem
当我尝试在 RedHat 5.3 服务器上构建时,我刚刚遇到了同样的问题。这是我发现的。该错误似乎是由空的
RPM_BUILD_ROOT
变量引起的。下面是一个有问题的行:如果尚未定义
RPM_BUILD_ROOT
,则要查找的第一个参数是空字符串“”,这会导致此错误。有趣的是,如果您删除$RPM_BUILD_ROOT
周围的引号,则命令可以正常工作,因为第一个参数将变为“!”。由于不需要在规范文件中定义“BuildRoot
:”,因此这对我来说肯定是一个错误。I just hit this same problem when attempting to build on a RedHat 5.3 server. Here is what I found. The error appears to be caused by an empty
RPM_BUILD_ROOT
variable. Below is one offending line:If
RPM_BUILD_ROOT
hasn't been defined, then the first argument to find is an empty string "", which causes this error. Interestingly enough, if you remove the quotes from around$RPM_BUILD_ROOT
, then command works fine since the first argument would become the "!". Since it's not required to define a "BuildRoot
:" in the spec file, this certainly looks like a bug to me.