美好的一天,我有一台Mac OSX Yosemite我正在尝试使用命令安装指南针:
sudo gem install compass
但我收到以下错误:
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151001-1122-1jqcu8r.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/ffi-1.9.10/gem_make.out
在尝试安装软件包之前,我使用命令更新了gem
sudo gem update --system
并且更新没有错误
1 回答
您可能需要先安装命令行开发人员工具 .
然后再次尝试
sudo gem install compass