我在安裝Nokogiri時遇到了問題。當我運行bundle install
或gem install nokogiri
時,安裝失敗。爲什麼不安裝Nokogiri?
我得到的錯誤是: (注:此故障是使用上nokogiri.org安裝命令)
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/roneesh/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28/ --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
Extracting libxml2-2.8.0.tar.gz into tmp//ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp//ports/libxml2/2.8.0/configure.log' to see what happened.
*** 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.
我試圖使用的命令是:
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28/ --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
我已經將brew,xml2,xslt和libiconv全部安裝好了,並放在上面的正確版本中。仍然沒有決議。我沒有做的唯一的事情是來自源代碼的libiconv(我的wget命令由於某種原因沒有工作)。
你爲什麼要傳遞的所有這些選項:部份的圖書館對鏈接? –
顯示'tmp // ports/libxml2/2.8.0/configure.log'的內容 –