dyld:未找到符号:_ffi_prep_closure_loc(在 Mac 上)

2024-01-28

我做了一个常规的flutter run今天在我的 Mac 上,针对我的 iPhone 模拟器,出现了这些错误。

Error output from CocoaPods:
↳
    dyld: lazy symbol binding failed: Symbol not found: _ffi_prep_closure_loc
      Referenced from: /Users/toure/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
      Expected in: /usr/lib/libffi.dylib

    dyld: Symbol not found: _ffi_prep_closure_loc
      Referenced from: /Users/toure/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
      Expected in: /usr/lib/libffi.dylib

你如何解决dyld: Symbol not found: _ffi_prep_closure_loc error?


我发现一个修复埋在github问题 https://github.com/ffi/ffi/issues/687#issuecomment-468005152.

在我的 Mac 上运行这个解决了这个问题。

gem uninstall ffi
brew reinstall libffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
gem install ffi

我决定分享这一点,因为问题标题中的错误与我得到的错误不同。希望这可以节省某人一些时间。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

dyld:未找到符号:_ffi_prep_closure_loc(在 Mac 上) 的相关文章

随机推荐