ikaruga.org

俺VS nokogiri in MBA

hourai:~ ikaruga$ gem install nokogiriERROR:  While executing gem ... (Errno::EACCES)    Permission denied - /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/.autotesthourai:~ ikaruga$ sudo gem install nokogiriPassword:Building native extensions.  This could take a while...ERROR:  Error installing nokogiri:    ERROR: Failed to build gem native extension.    /Users/ikaruga/.rbenv/versions/2.0.0-p195/bin/ruby extconf.rbExtracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0... OKRunning 'configure' for libxml2 2.8.0... OKRunning 'compile' for libxml2 2.8.0... OKRunning 'install' for libxml2 2.8.0... OKActivating libxml2 2.8.0 (from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0)...Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxslt/1.1.26... OKRunning 'configure' for libxslt 1.1.26... OKRunning 'compile' for libxslt 1.1.26... OKRunning 'install' for libxslt 1.1.26... OKActivating libxslt 1.1.26 (from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.26)...checking for libxml/parser.h... *** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers.  Check the mkmf.log file for more details.  You mayneed 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=/Users/ikaruga/.rbenv/versions/2.0.0-p195/bin/ruby    --with-zlib-dir    --without-zlib-dir    --with-zlib-include    --without-zlib-include=${zlib-dir}/include    --with-zlib-lib    --without-zlib-lib=${zlib-dir}/lib    --with-iconv-dir    --without-iconv-dir    --with-iconv-include    --without-iconv-include=${iconv-dir}/include    --with-iconv-lib    --without-iconv-lib=${iconv-dir}/lib    --with-xml2-dir    --without-xml2-dir    --with-xml2-include    --without-xml2-include=${xml2-dir}/include    --with-xml2-lib    --without-xml2-lib=${xml2-dir}/lib    --with-xslt-dir    --without-xslt-dir    --with-xslt-include    --without-xslt-include=${xslt-dir}/include    --with-xslt-lib    --without-xslt-lib=${xslt-dir}/lib    --with-libxslt-config    --without-libxslt-config    --with-pkg-config    --without-pkg-config    --with-libxml-2.0-config    --without-libxml-2.0-config    --with-libiconv-config    --without-libiconv-config/Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)You have to install development tools first.    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:562:in `try_cpp'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:1086:in `block in find_header'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:892:in `block in checking_for'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:337:in `block (2 levels) in postpone'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:307:in `open'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:337:in `block in postpone'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:307:in `open'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:333:in `postpone'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:891:in `checking_for'    from /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:1085:in `find_header'    from extconf.rb:166:in `
'Gem files will remain installed in /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1 for inspection.Results logged to /Users/ikaruga/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/ext/nokogiri/gem_make.outhourai:~ ikaruga$

はたしてなんなのやら。