美文网首页Flutter随笔
Cocoapods install failed 记录

Cocoapods install failed 记录

作者: 嘛尼嘛哄 | 来源:发表于2020-08-26 17:13 被阅读0次

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安装

  1. 安装rvm (如果安装过程中报错 无法访问 raw.githubusercontent.com, 将其解析成ip地址,修改 /etc/hosts配置及可)
  2. 安装ruby
  3. 更新ruby源为中国
  4. 安装Xcode及Command Tool工具
  5. sudo gem install cocoapods

相关文章

网友评论

    本文标题:Cocoapods install failed 记录

    本文链接:https://www.haomeiwen.com/subject/ggexsktx.html