macOS 10.14.6 安装cocoapods出错

xcode 11.3.1 已安装,执行

sudo gem install cocoapods

出现错误

RROR:  Error installing cocoapods:
         ERROR: Failed to build gem native extension.
 current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c
 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200319-1090-1u4hxao.rb extconf.rb
 mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h
 extconf failed, exit code 1

执行下面的命令,安装后, 问题解决

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: macOS 10.14.6 安装cocoapods出错

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据