flutter - dyld:找不到符号:_ffi_prep_closure_loc(在 Mac 上)

标签 flutter cocoapods dyld

我做了一个常规 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错误?

最佳答案

我在 github issue 中找到了一个修复程序.
在我的 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
我决定分享这个,因为问题标题中的错误与我得到的不同。希望这可以节省一些时间。

关于flutter - dyld:找不到符号:_ffi_prep_closure_loc(在 Mac 上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63267667/

相关文章:

imagemagick - 原因 : Incompatible library version: identify requires version 14. 0.0 或更高版本,但 libfreetype.6.dylib 提供版本 13.0.0 Trace/BPT 陷阱

flutter - 使用提供者值 flutter 初始路线

firebase - Flutter/Firebase-如何创建包含水平 ListView 的垂直 ListView

ios - 无法使用 Xcode 9.4、Swift 4.1 在 KASlideShow pod 中加载图像

python - 自 Mac OS 10.11 El Capitan 以来具有系统完整性保护的 DYLD_LIBRARY_PATH 技巧的替代方法

macos - Mac OS X 应用程序可以阻止 dlopen 加载库吗?

Flutter:如何更改 showTimePicker 小部件的颜色

flutter - 是否可以屈服于 Dart 中的外部作用域?

flutter 医生 - CocoaPods 已安装但无法正常工作

ios - 存档导出错误 : The archive contains nothing that can be signed