简体   繁体   中英

gem install nmatrix failed

When I type in the command gem install matrix . It report an "fatal" error that the stdio.h is missing! why? and how to fix it? Thank you! The bug report below:

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

该错误类似于其他问题,对于他们来说,这似乎可以解决问题。

xcode-select --install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM