0
我在各方面嘗試,但錯誤依然存在!RPM生成錯誤:/var/tmp/rpm-tmp.OJ8A3jinválido(%build)
[[email protected] 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)
規範文件如下:
[[email protected] ~]# 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
一些幫助?
'./configure:error:invalid option「--host = i686-redhat-linux-gnu」'是真正的問題 - 您是否安裝了32位編譯器?如果您提取tarball並手動運行該行,會發生什麼情況?它可能會給你一個更明確的原因,爲什麼。 –
是的,壓縮包是問題! – satan