当前位置: 技术问答>linux和unix
请教生成rpm的问题
来源: 互联网 发布时间:2016-08-31
本文导语: 代码是hello.c编译出来的hello.out. hello.spec为: Summary: example Name: hello Version: 0.1 Release: 1 Group: Application/User License: Share Packager: hello %description #hello example %changelog * Sun Jun 6 2004 CSP - build for the first time. %prep %build...
代码是hello.c编译出来的hello.out.
hello.spec为:
执行rpmbuild -bb hello.spec
之后,出现这样的错误:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.59217
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ $'r'
: command not found217: line 27:
error: Bad exit status from /var/tmp/rpm-tmp.59217 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.59217 (%prep)
有没有人知道怎么解决? 谢谢.
hello.spec为:
Summary: example
Name: hello
Version: 0.1
Release: 1
Group: Application/User
License: Share
Packager: hello
%description
#hello example
%changelog
* Sun Jun 6 2004 CSP
- build for the first time.
%prep
%build
%install
%files
/usr/lib/hello.out
执行rpmbuild -bb hello.spec
之后,出现这样的错误:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.59217
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ $'r'
: command not found217: line 27:
error: Bad exit status from /var/tmp/rpm-tmp.59217 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.59217 (%prep)
有没有人知道怎么解决? 谢谢.
|
如果你的hello.out和你的spec文件在同一个目录的话:
Summary: example
Name: hello
Version: 0.1
Release: 1
Group: Application/User
License: Share
Packager: hello
%description
#hello example
%changelog
* Sun Jun 6 2004 CSP
- build for the first time.
%prep
%build
%install
mkdir -p ./usr/lib
cp $OLDPWD/hello.out ./usr/lib
%files
/usr/lib/
|
你在/usr/lib目录下有hello.out这个文件吗?
|
没搞过 只能帮顶