当我输入命令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发布于 2015-12-12 12:39:15
这个错误类似于一堆其他问题,对他们来说,这似乎解决了它。
xcode-select --installhttps://stackoverflow.com/questions/34236075
复制相似问题