解决 mac 10.15.4 安装cocoapods遇到的坑

在升级macOS到最新系统后,安装cocoapods时遇到错误:`ERROR: Failed to build gem native extension`。通过运行`xcode-select --install`解决ruby头文件缺失问题,然后重新安装cocoapods。若pod install时出现CDN错误,可在Podfile中添加`source 'https://github.com/CocoaPods/Specs.git'`。
摘要由CSDN通过智能技术生成

今天升级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/extens

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值