如何解决配置猜测构建类型失败?

sea*_*ean 33 cygwin configure

当我配置(在cygwin环境下)时,发生错误,消息如下:

$ ./configure
.................
checking build system type... /bin/sh: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one
Run Code Online (Sandbox Code Playgroud)

怎么解决?谢谢!!

小智 62

搜索 /usr/share/automake*/config.guess

查看最新版本的automake

$ which automake
$ automake --version
Run Code Online (Sandbox Code Playgroud)

在中找到合适的automake文件夹 /usr/share/automake.1.11.1/config.guess

config.guess你的构建树替换/usr/share/automake.1.11.1/config.guess

(通常需要/通常需要config.sub.)


Pee*_*oot 6

错误消息还可能包括有关如何处理此问题的说明.就我而言,我看到了

This script, last modified 2008-01-23, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
Run Code Online (Sandbox Code Playgroud)

在浏览器中,我能够访问这些文件,将它们保存到我的系统,然后覆盖正在构建的包中的相应./config/config.guess和./config/config.sub文件.


Ste*_*lum 6

配置错误:无法猜测构建类型,您必须指定一个

这通过--build=./configure步骤中指定参数为我解决了。

为了 arm64

./configure --build=aarch64-unknown-linux-gnu
Run Code Online (Sandbox Code Playgroud)

为了 x86

./configure --build=x86_64-unknown-linux-gnu
Run Code Online (Sandbox Code Playgroud)

  • 这在与 OP 不同的情况下为我修复了它。谢谢! (2认同)