我通过 brew 在 OS X 上安装了 gcc6.1,当我尝试在我的 Mac 上安装 sciruby-full 时,总是得到这个错误:
>Fetching: nmatrix-0.1.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing sciruby-full:
ERROR: Failed to build gem native extension.
/usr/local/opt/ruby/bin/ruby -r ./siteconf20150627-98945-1pk3go6.rb extconf.rb
checking for apparent GNU g++ binary with C++0x/C++11 support... Exception `RuntimeError' at extconf.rb:144 - You need a version of g++ which supports -std=c++0x or -std=c++11. If you're on a Mac and using Homebrew, we recommend using mac-brew-gcc.sh to install a more recent g++.
*** 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
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/Cellar/ruby/2.2.2/bin/$(RUBY_BASE_NAME)
extconf.rb:144:in `<main>': You need a version of g++ which supports -std=c++0x or -std=c++11. If you're on a Mac and using Homebrew, we recommend using mac-brew-gcc.sh to install a more recent g++. (RuntimeError)
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.2.0/gems/nmatrix-0.1.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/nmatrix-0.1.0/gem_make.out
我的 ruby 和 OS X 总是最新的:更新 Yosemite 上的 Ruby 2.2.2。