RPM构建错误:/var/tmp/rpm-tmp.OJ8A3jinválido(%build)

时间:2015-11-15 23:09:49

标签: nginx rpmbuild

我正在尝试各种方式,但仍然存在错误!!

  

[root @ localhost nginx-1.8.0] #rpmbuild -v -bb --clean   /root/rpmbuild/SPECS/NGNX.spec

Executando (%prep): /bin/sh -e /var/tmp/rpm-tmp.UnDrvt
+ umask 022
+ cd /root/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /root/rpmbuild/BUILD
+ rm -rf NGNX-666
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/NGNX-666.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd NGNX-666
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executando (%build): /bin/sh -e /var/tmp/rpm-tmp.OJ8A3j
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd NGNX-666
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/lib/gfortran/modules'
+ export FFLAGS
+ ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i686-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
./configure: error: invalid option "--host=i686-redhat-linux-gnu"
erro: Status de saída de /var/tmp/rpm-tmp.OJ8A3j inválido (%build)


Erros na construção do RPM:
    Status de saída de /var/tmp/rpm-tmp.OJ8A3j inválido (%build)

spec文件如下:

  

[root @ localhost~] #cat /root/rpmbuild/SPECS/NGNX.spec

Name:           NGNX
Version:        666
Release:        1%{?dist}
Summary:        Esse eh apenas um teste do firewall de aplicacao

Group:          Development/Tools
License:        GPL
URL:            https://github.com/nbs-system/naxsi
Source0:        %{name}-%{version}.tar.gz

BuildRequires:  gcc
Requires:       gcc make automake

Prefix:     /etc

%description


%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc



%changelog

一些帮助?

1 个答案:

答案 0 :(得分:0)

./configure: error: invalid option "--host=i686-redhat-linux-gnu"是真正的问题 - 你安装了32位编译器吗?如果您提取tarball并手动运行该行会发生什么?它可能会给你一个更明确的原因。