我想用ruby啓動命令提示符來使用jekyll和jekyll-s3。當使用gem install jekyll-s3
時,我得到一個錯誤,告訴libxml2丟失,我應該訪問http://nokogiri.org/tutorials/installing_nokogiri.html以獲取安裝依賴關係的幫助。當我訪問該頁面時,只是說我需要使用gem install nokogiri
。但是,當我這樣做時,我收到了類似的錯誤。安裝nokogiri時出錯
我發現一個相似的問題在這裏問Error installing Nokogiri 1.5.0 with rails 3.1.0 and ubuntu,因爲我使用Windows,我不能使用sudo命令。我還發現這個問題libxml2 missing when installing nokogiri's gem devkit (windows),並試圖使用包含在問題中的命令,並且我得到了問題中包含的相同錯誤輸出。那裏的評論似乎沒有幫助。
我已經包括在下面安裝引入nokogiri錯誤的整個輸出。我猜我需要安裝某種先決條件包/庫,但我不知道如何。我應該怎麼做才能讓這些寶石正常工作?
ruby 2.0.0p0 (2013-02-24) [x64-mingw32]
C:\Users\Ryan Lang>gem install nokogiri
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
The system cannot find the path specified.
checking for libxml/parser.h... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokog
iri.html for help with installing dependencies.
-----
*** 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=C:/Ruby200-x64/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}/
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/
--with-libxslt-config
--without-libxslt-config
--with-pkg-config
--without-pkg-config
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-pkg-config
--without-pkg-config
--with-libiconv-config
--without-libiconv-config
--with-pkg-config
--without-pkg-config
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/nokog
iri-1.5.6 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.6/ext/nok
ogiri/gem_make.out
C:\Users\Ryan Lang>
如果穆罕默德不會去山上,那麼山肯定會來到穆罕默德.. http://stackoverflow.com/questions/5778804/installing-ruby-gems-manually/10386302#10386302祝你好運! – 2013-03-14 12:48:26