Could not find 'ffi' (>= 1.3.0) among 117 total gem(s) (Gem::MissingSpecError) ruby-3.0.0/lib/ru...

Mac终端运行CocoaPod命令时报错:

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/  
ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs':   
Could not find 'ffi' (>= 1.3.0) among 81 total gem(s) (Gem::MissingSpecError)  

Checked in 'GEM_PATH=/Users/username/.rvm/gems/ruby-3.0.0:/Users/  
username/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0',   
execute `gem env` for more information

解决方案:

brew reinstall cocoapods

brew link --overwrite cocoapods

检查结果

pod --version
得到
1.10.1
成功

你可能感兴趣的:(Could not find 'ffi' (>= 1.3.0) among 117 total gem(s) (Gem::MissingSpecError) ruby-3.0.0/lib/ru...)