Running 'configure' for libxml2 2.9.2... ERROR, review '/Users/killernova/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.7.1/ext/nokogiri/tmp/x86_64-apple-darwin15/ports/libxml2/2.9.2/configure.log' to see what happened. Last lines are:
========================================================================
: command not foundem type... ./config.guess: line 4:
: command not founde 6:
: command not founde 33:
: command not founde 34:
: command not founde 36:
: command not founde 48:
: command not founde 57:
: command not founde 60:
'/config.guess: line 63: syntax error near unexpected token `in
'/config.guess: line 63: ` case $1 in
configure: error: cannot guess build type; you must specify one
========================================================================
*** 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
--without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
/Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete configure task (RuntimeError)
from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'
from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:106:in `configure'
from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:149:in `cook'
from extconf.rb:289:in `block (2 levels) in process_recipe'
from extconf.rb:182:in `block in chdir_for_build'
from extconf.rb:181:in `chdir'
from extconf.rb:181:in `chdir_for_build'
from extconf.rb:288:in `block in process_recipe'
from extconf.rb:187:in `tap'
from extconf.rb:187:in `process_recipe'
from extconf.rb:478:in `<main>'
"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frame works/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2. 0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c -L. -L/Sys tem/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L. -L/usr/local/lib -arch x86_64 -arch i386 -lruby.2.0.0 -liconv -lpthread -ldl -lo bjc "
94 checked program was:
95 /* begin */
96 1: #include "ruby.h"
97 2:
98 3: #include <stdlib.h>
99 4: #include <iconv.h>
100 5:
101 6: int main(void)
102 7: {
103 8: iconv_t cd = iconv_open("", "");
104 9: iconv(cd, NULL, NULL, NULL, NULL);
105 10: return EXIT_SUCCESS;
106 11: }
107 /* end */
search for /usr/share/automake*/config.guess
check the latest version of automake
$ which automake
$ automake --version
find the appropriate automake folder in /usr/share/automake.1.11.1/config.guess
replace config.guess from your build tree with /usr/share/automake.1.11.1/config.guess
/usr/lib/php/build/config.guess
/usr/local/Cellar/automake/1.15/share/automake-1.15/config.guess
/usr/local/Cellar/libtool/2.4.6/share/libtool/build-aux/config.guess
此外,还有说从网上下载 config.guess 和 config.sub 进行替换
============================分割线===========================
gem install nokogiri -- --use-system-libraries
, 但不知道为什么我试了一次没用。gem install rails
,照例提示错误,按提示gem install nokogiri -- --use-system-libraries
,成功,gem install rails
,竟然成功了。。。