首页 > 解决方案 > pod 安装失败,找不到 dylib

问题描述

我的 podfile 是这个。

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

target 'Task Tracker' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Task Tracker
  pod 'RealmSwift', '~> 10'
end

我正在尝试运行pod install 它给了我错误LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi_c.bundle, 0x0009): dependent dylib '@rpath/libffi.7.dylib' not found for '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi_c.bundle' - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi_c.bundle

我试过的

gem install ffi
arch -x86_64 pod install

还是一样的错误。我错过了什么?

标签: iosrubycocoapods

解决方案


If you're using Intel chip Mac and getting this error after trying the above command also, it's because of the cocoa pods installed on your Mac (Not installed properly). Completely remove the cocoapods and install it again from the beginning. This solution will work.


推荐阅读