gem install nmatrix失败了

时间:2015-12-12 03:55:20

标签: ruby-on-rails ruby gem

当我输入命令gem install matrix时。它报告了一个致命的" stdio.h丢失的错误!为什么?以及如何解决它?谢谢!下面的错误报告:

Building native extensions.  This could take a while...

ERROR:  Error installing nmatrix:
ERROR: Failed to build gem native extension.

/Users/apple/.rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20151212-6597-v5fw6g.rb extconf.rb

/Users/apple/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby/defines.h:26:19: fatal error: stdio.h: No such file or directory

checking for apparent GNU g++ binary with C++0x/C++11 support... 4.9
using C++ standard... c++11
g++ reports version... gcc
creating nmatrix_config.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling nmatrix.cpp
In file included from /Users/apple/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby/ruby.h:29:0,
                 from /Users/apple/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby.h:33,
                 from nmatrix.cpp:34:
/Users/apple/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby/defines.h:26:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
make: *** [nmatrix.o] Error 1

make failed, exit code 2

1 个答案:

答案 0 :(得分:0)

错误类似于其他一些问题,对于他们来说这似乎解决了这个问题。

xcode-select --install