微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法安装 Pod

如何解决无法安装 Pod

我是 Mac 操作系统的新手。我正在使用 Macincloud 托管服务器使用它。在我使用终端的 Xcode 项目路径中,我首先运行 pod init 然后我将我的 pod 文件更新为

# Uncomment the next line to define a global platform for your project
 platform :ios,'9.0'

target 'SadhanaTracker' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'


  target 'SadhanaTrackerTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'SadhanaTrackerUITests' do
    # Pods for testing
  end

end

之后我运行了 pod install 但它没有安装。我收到的错误如下所示。

Analyzing dependencies
dyld: lazy symbol binding Failed: Symbol not found: _ffi_prep_closure_loc
  Referenced from: /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.15.0/lib/ffi_c.bundle
  Expected in: /usr/lib/libffi.dylib

dyld: Symbol not found: _ffi_prep_closure_loc
  Referenced from: /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.15.0/lib/ffi_c.bundle
  Expected in: /usr/lib/libffi.dylib

Abort trap: 6

我在 Mac Catalina 上遵循了相同的步骤并且它起作用了,但由于 Catalina 不允许使用托管服务的声音,我降级到 Mojave。你能帮我如何消除这个错误并成功安装我的依赖项吗?

Update-1:Mac 云支持为我提供了一种使用 gem install <gem-name> --user-install 安装 gem 的方法。我从 ffi gem 运行此命令,然后收到以下错误消息。

Analyzing dependencies
dyld: lazy symbol binding Failed: Symbol not found: _ffi_prep_closure_loc
  Referenced from: /Users/user197132/.gem/ruby/2.5.0/gems/ffi-1.15.3/lib/ffi_c.bundle
  Expected in: /usr/lib/libffi.dylib

dyld: Symbol not found: _ffi_prep_closure_loc
  Referenced from: /Users/user197132/.gem/ruby/2.5.0/gems/ffi-1.15.3/lib/ffi_c.bundle
  Expected in: /usr/lib/libffi.dylib

我可以观察到 ffi gem 被引用的位置发生了变化,但在 /usr/lib/ 中仍然是预期的。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。