首页 > 解决方案 > 无法在arm Mac上安装ffi

问题描述

我在 Apple Silicon Mac 上安装 ffi,使用 rosetta2

brew 适用于rosetta2。因此我设置了这个。

LDFLAGS="-L/usr/local/opt/libffi/lib" 
PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
checking for ffi.h... yes
checking for ffi_call() in -lffi... yes
checking for ffi_closure_alloc()... yes
checking for shlwapi.h... no
checking for rb_thread_call_without_gvl()... no
Ruby C-API function `rb_thread_call_without_gvl` is missing
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

似乎找到了 ffi.h,但缺少 shlwapi.h 和 rb_thread_call_without_gvl。有人知道它如何找到 shlwapi.h 吗?

标签: ruby-on-railsrubyrubygemsffi

解决方案


推荐阅读