我想在 MacOS 上安装 cocoapods 来运行 pod 命令。但是在做
sudo gem install cocoa-pods
Run Code Online (Sandbox Code Playgroud)
我得到以下信息:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.7.0/gems/ffi-1.13.1/ext/ffi_c
/usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.7.1_2/lib/ruby/2.7.0 -r ./siteconf20200702-22528-1o4wbn0.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include …Run Code Online (Sandbox Code Playgroud) 当我尝试在macOS Mojave(10.14.1)上使用ruby支持( - enable-rubyinterp)构建vim(8.1.0509)时出现错误:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error:
'ruby/config.h' file not found
#include "ruby/config.h"
Run Code Online (Sandbox Code Playgroud)
我已经安装了Xcode 10.1.
xcode-select -p
/Applications/Xcode.app/Contents/Developer
Run Code Online (Sandbox Code Playgroud)
谢谢
PS在我的问题上看到我的答案它解释了为什么我的问题与Xcode的问题不同