我试图安装一个gem,但一直遇到以下错误:
Building native extensions. This could take a while...
ERROR: Error installing mandrill-template-manager:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2/ext/unicode
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20170221-17481-1m13rrx.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2/ext/unicode
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2/ext/unicode
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin16/ruby/config.h', needed by `unicode.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/unicode-0.4.4.2/gem_make.out
我尝试了以下内容:
更新:RAN xcode-select --install
结果;
Building native extensions. This could take a while...
ERROR: Error installing mandrill-template-manager:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2/ext/unicode
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20170221-18173-nchdps.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2/ext/unicode
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2/ext/unicode
make "DESTDIR="
compiling unicode.c
In file included from unicode.c:13:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:68:
/usr/include/stdio.h:133:19: error: expected ')'
int (* _Nullable _close)(void *);
^
/usr/include/stdio.h:133:6: note: to match this '('
int (* _Nullable _close)(void *);
^
/usr/include/stdio.h:134:19: error: expected ')'
int (* _Nullable _read) (void *, char *, int);
^
/usr/include/stdio.h:134:6: note: to match this '('
int (* _Nullable _read) (void *, char *, int);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [unicode.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/unicode-0.4.4.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/unicode-0.4.4.2/gem_make.out
错误太多但你得到的照片;)