解决 mac 10.15.4 安装cocoapods遇到的坑末尾报错gem_make.out
今天升级macOS最新系统后,安装cocoapods遇到的bug问题,已解决。
前面的配置完成后,不管输入sudo gem install cocoa pods还是输入sudo gem install -n /usr/local/bin cocoa pods都报错信息
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/ext/ffi_c
1
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200430-75028-3e0jka.rb extconf.rb
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.12.2/gem_make.out
解决办法 终端: xcode-select --install 等安装软件完成再输入 sudo gem install -n /usr/local/bin cocoa pods 、pod setup,测试 pod search AFNetworking 。
开始使用 cocoapods
pod install 遇到 [!] CDN: trunk Repo update failed 错误怎么解决
很简单在Podfile文件中添加一句话即可
source ‘https://github.com/CocoaPods/Specs.git’
————————————————
版权声明:本文为CSDN博主「cc_ll」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/cc_ll/article/details/105855331
网友评论