"Can't open Bazel-real : Bad CPU type in executable" 是否有任何解决方法

Is there any work around for "Can't open Bazel-real : Bad CPU type in executable"

我使用 MacBook Pro、BigSur OS。我正在尝试构建 Bazel。但我总是收到“无法打开 Bazel-real:Bad CPU type in executable”错误。我已经使用 curl 和二进制安装程序下载但失败了。

尝试使用 brew ?

安装brew

/bin/bash -c "$(curl -fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

然后安装 bazel

brew install bazel

检查是否安装正确

bazel --version