0
我無法在運行Mountain Lion的Mac上安裝Nokogiri。無法在Mac(Mountain Lion)上安裝Nokogiri 1.6.0?
我試着用命令來安裝它:
gem install nokogiri -v '1.6.0'
我得到這樣的輸出:
Building native extensions. This could take a while...
/usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby193/1.9.3-p448/bin/ruby extconf.rb
/usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.1/lib/mini_portile.rb:215: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxslt/1.1.26)...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
make
compiling html_document.c
gcc-4.7: error: unrecognized command line option '-Wshorten-64-to-32'
make: *** [html_document.o] Error 1
Gem files will remain installed in /usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0 for inspection.
Results logged to /usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
任何人都可以幫我嗎?
我們需要更多信息。您是否安裝了當前的XCode以及相關的命令行工具? –