You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

M1芯片本地运行Blockscout时C编译器无法生成可执行文件的问题求助

M1芯片本地运行Blockscout时C编译器无法生成可执行文件的问题求助

我在M1芯片的Mac上尝试本地部署Blockscout,跟着官方指南操作的时候遇到了报错,核心问题是C编译器无法生成可执行文件,完整的错误输出如下:

Generated mix_erlang_tasks app

c_src/build_deps.sh

Cloning into 'secp256k1'...

remote: Enumerating objects: 8569, done.

remote: Counting objects: 100% (120/120), done.

remote: Compressing objects: 100% (75/75), done.

remote: Total 8569 (delta 62), reused 87 (delta 45), pack-reused 8449

Receiving objects: 100% (8569/8569), 9.43 MiB | 9.54 MiB/s, done.

Resolving deltas: 100% (5969/5969), done.

HEAD is now at d333521 Merge #494: Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS

glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.

glibtoolize: copying file 'build-aux/ltmain.sh'

glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.

glibtoolize: copying file 'build-aux/m4/libtool.m4'

glibtoolize: copying file 'build-aux/m4/ltoptions.m4'

glibtoolize: copying file 'build-aux/m4/ltsugar.m4'

glibtoolize: copying file 'build-aux/m4/ltversion.m4'

glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4'

configure.ac:28: warning: The macro `AC_PROG_CC_C89' is obsolete.

configure.ac:28: You should run autoupdate.

./lib/autoconf/c.m4:1652: AC_PROG_CC_C89 is expanded from...

configure.ac:28: the top level

configure.ac:10: installing 'build-aux/compile'

configure.ac:5: installing 'build-aux/config.guess'

configure.ac:5: installing 'build-aux/config.sub'

configure.ac:9: installing 'build-aux/install-sh'

configure.ac:9: installing 'build-aux/missing'

Makefile.am: installing 'build-aux/depcomp'

parallel-tests: installing 'build-aux/test-driver'

checking build system type... aarch64-apple-darwin22.3.0

checking host system type... aarch64-apple-darwin22.3.0

checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c

checking whether build environment is sane... yes

checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p

checking for gawk... no

checking for mawk... no

checking for nawk... no

checking for awk... awk

checking whether make sets $(MAKE)... yes

checking whether make supports nested variables... yes

checking how to print strings... printf

checking whether make supports the include directive... yes (GNU style)

checking for gcc... /usr/local/opt/llvm/bin/clang

checking whether the C compiler works... no

configure: error: in `/blockscout/deps/libsecp256k1/c_src/secp256k1':

configure: error: C compiler cannot create executables

See `config.log' for more details

make: *** [priv/libsecp256k1_nif.so] Error 77

==> libsecp256k1

warning: Mix compiler :make_bindings was supposed to return {:ok | :noop | :error, [diagnostic]} but it returned :error

Compiling 1 file (.erl)

src/libsecp256k1.erl:146:1: Warning: function not_loaded/1 is unused

%  146| not_loaded(Line) ->

%     | ^

Generated libsecp256k1 app

==> con_cache

Compiling 8 files (.ex)

warning: use Bitwise is deprecated. import Bitwise instead

lib/con_cache/owner.ex:5: ConCache.Owner

我已经试过切换到Homebrew安装的gcc,但还是没能解决问题。有没有朋友遇到过类似情况,能给点解决建议吗?

我的环境信息

  • Elixir & Erlang/OTP版本:elixir 1.14.3 (compiled with Erlang/OTP 25)
  • 操作系统:macOS 13.2
  • Erlang版本:v25.2.1
  • gcc版本:
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  • clang版本:
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

备注:内容来源于stack exchange,提问作者Meldum

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 15:22:37