Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
错误原因,需要安装Xcode并更新CommandTool
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /Users/xxxx/bin in PATH, mode 040777
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
错误原因Ruby头文件没有找到,需要更新Ruby环境,使用 rvm安装
- 安装rvm (如果安装过程中报错 无法访问 raw.githubusercontent.com, 将其解析成ip地址,修改 /etc/hosts配置及可)
- 安装ruby
- 更新ruby源为中国
- 安装Xcode及Command Tool工具
- sudo gem install cocoapods
网友评论