configure: error: cannot find required auxiliary files: config.guess config.sub

macOS上执行configure时,报错:

running CONFIG_SHELL=/bin/sh /bin/sh ./configure --host aarch64-linux-android host_alias=aarch64-linux-android CC=/Users/XXX/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang --no-create --no-recursion
configure: error: cannot find required auxiliary files: config.guess config.sub
make: *** [config.status] Error 1

原因是使用了2.71版本的autoconf,需要回退到2.69版本。

如果是使用brew安装的autoconf,需要先指定安装2.69版本,再强制link:

brew install [email protected]
brew link --overwrite [email protected]
autoconf -V
autoconf (GNU Autoconf) 2.69

或者先unlink再link:

brew install [email protected]
brew unlink autoconf
brew link [email protected]
autoconf -V
autoconf (GNU Autoconf) 2.69

如果直接link会报错:

Linking /usr/local/Cellar/[email protected]/2.69...
Error: Could not symlink bin/autoconf
Target /usr/local/bin/autoconf
is a symlink belonging to autoconf. You can unlink it:
  brew unlink autoconf

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite --dry-run [email protected]

其实以前直接用brew switch [email protected]就行了,但是后来brew移除了brew switch命令:https://github.com/orgs/Homebrew/discussions/339

参考文献:

https://github.com/asdf-vm/asdf-erlang/issues/195#issuecomment-849110313

Share

You may also like...

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注