我做了一个常规 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/