ruby - 在 OS X 上安装 SciRuby 失败

标签 ruby macos gcc nmatrix sciruby

我通过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。

最佳答案

根据您的错误消息:

extconf.rb:144:in `': 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)

关于ruby - 在 OS X 上安装 SciRuby 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31085383/

相关文章:

ruby-on-rails - 更多 gem 安装 rails 令人头疼

java - jnlp 文件提示 mac 下载 JRE,但其已安装 (Java 1.6.0_37) Mac OSX 10.7.5

c - gcc:修复 -pedantic "unnamed structure"警告

c - MinGW gcc 与 linux gcc 可执行文件大小

ruby-on-rails - 设计自定义 after_update_path_for 不被调用(Rails 4)

ios - 使用载波将图像从 iphone 应用程序上传到 Rails 应用程序

ruby - 在使用 Ruby 2.0.0 的 Windows 7 上安装 sinatra-contrib 时出错

macos - 如何在其 contentView 上拖动 NSWindow 和 NSImageView ?

swift - 不能做一个标签的导出

c++ - linux上g++9.3.0 -O2的一个奇怪bug