更新了最新的Mac系统,升级到maxOS Big Sur和Xcode12.5之后,执行pod 总是报错,
Pod Install: Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
在网上搜索发现国内的博客都是拷贝复制,没有真正解决问题,然后自己折腾,终于解决。分享一下。
?
首先,看报错日志,然后 执行
sudo gem pristine ffi然后还有报错信息如下:
/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 84 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/Users/dylan/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information安装更新cocoapods,以下命令没有权限的话,可以都在前面加上sudo
gem install cocoapods如果出现如下的报错信息,就执行下面的命令。
You might have to install separate package for the ruby development environment, ruby-dev or ruby-devel for example.
xcode-select --install再执行上面的?gem install cocoapods 命令。成功后日志如下: Building native extensions. This could take a while... Successfully installed ffi-1.13.1 Successfully installed public_suffix-4.0.6 Successfully installed addressable-2.7.0 Successfully installed cocoapods-core-1.10.0 Successfully installed cocoapods-downloader-1.4.0 Successfully installed nanaimo-0.3.0 Successfully installed xcodeproj-1.19.0 Successfully installed cocoapods-1.10.0
......
8 gems installed? ? ? 说明成功
最后可以输入命令?pod --version? 能够成功查看到版本,解决成功。
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。 |
标签: #pod #install #Ignoring #ffi1131 #because #its #Extensions #are