无效配置‘noarch-redhat-linux-gnu’:机器‘noarch-redhat’无法识别

无效配置‘noarch-redhat-linux-gnu’:机器‘noarch-redhat’无法识别

当我尝试从 src rpm(Apache 2.4.1)构建 rpm 时出现此错误:

rpmbuild -tb httpd-2.4.1.tar.bz2 --ba httpd.spec
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=noarch-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/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-layout=RPM --libdir=/usr/lib64 --sysconfdir=/etc/httpd/conf --includedir=/usr/include/httpd --libexecdir=/usr/lib64/httpd/modules --datadir=/var/www --with-installbuilddir=/usr/lib64/httpd/build --enable-mpms-shared=all --with-apr=/usr --with-apr-util=/usr --enable-suexec --with-suexec --with-suexec-caller=apache --with-suexec-docroot=/var/www --with-suexec-logfile=/var/log/httpd/suexec.log --with-suexec-bin=/usr/sbin/suexec --with-suexec-uidmin=500 --with-suexec-gidmin=100 --enable-pie --with-pcre --enable-mods-shared=all --enable-ssl --with-ssl --enable-socache-dc --enable-bucketeer --enable-case-filter --enable-case-filter-in --disable-imagemap
checking for chosen layout... RPM
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... Invalid configuration `noarch-redhat-linux-gnu': machine `noarch-redhat' not recognized
configure: error: /bin/sh build/config.sub noarch-redhat-linux-gnu failed
błąd: Błędny stan wyjścia z /var/tmp/rpm-tmp.48153 (%build)


Błędy budowania RPM-a:
    Błędny stan wyjścia z /var/tmp/rpm-tmp.48153 (%build)

答案1

我也尝试在 CentOS 5.5 上 rpmbuild Apache 2.4.1,并且通过修改 http.spec 文件解决了该错误:

%configure \
        --target=x86 \
        --enable-layout=RPM \

添加了带有 --target 的行。到目前为止,编译运行良好。

答案2

从您发布的内容来看,这似乎noarch-redhat-linux-gnu不是一个可识别的target参数。

我看到你在使用x86_64机器。你试过./configure用机器跑步吗target=x86_64-redhat-linux-gnu

答案3

为了修复automake 2.69基于旧版 RPM 的 Linux 上的构建,需要在spec文件中添加以下内容:

%configure \
        --target=x86_64-pc-none \
        --host=x86_64-pc-none \
        --build=x86_64-pc-none \
        ........

相关内容