首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在OS X上安装SciRuby失败

在OS X上安装SciRuby失败
EN

Stack Overflow用户
提问于 2015-06-27 13:11:10
回答 2查看 566关注 0票数 2

我通过brew在OS X上安装了gcc6.1,当我尝试在Mac上安装sciruby-full时,总是收到以下错误:

代码语言:javascript
复制
>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总是最新的:更新后的Yosemite上的Ruby 2.2.2。

EN

回答 2

Stack Overflow用户

发布于 2015-06-27 16:39:21

从您的错误消息:

extconf.rb:144:in `':您需要一个支持-std=c++0x或-std=c++11的g++版本。如果您使用的是Mac并使用Homebrew,我们建议您使用mac-brew-gcc.sh来安装更新的g++。(RuntimeError)

票数 1
EN

Stack Overflow用户

发布于 2015-10-30 04:02:26

执行以下操作(使用自制软件)

代码语言:javascript
复制
brew tap homebrew/versions
brew install gcc48

如果这不起作用,请尝试gcc47gcc46

注释:它需要一段时间才能构建。gcc相当大。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31085383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档