CocoaPods:无法构建gem本机扩展

时间:2020-09-08 10:22:51

标签: ios rubygems cocoapods

我在安装cocoapods时遇到了麻烦。 在终端中,我正在运行以下命令: sudo gem install cocoapods。

答案是这个

Building native extensions. This could take a while...
ERROR:  Error installing cocoapods:
  ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -I /Library/Ruby/Site/2.3.0 -r ./siteconf20200908-9483-1yecupd.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

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.13.1/gem_make.out

有人可以暗示我该怎么办吗?非常感谢!

0 个答案:

没有答案