9

rubyで起動コマンドプロンプトを使ってjekyllとjekyll-s3を使おうとしています。使用するgem install jekyll-s3と、libxml2 が見つからないというエラーが表示され、依存関係のインストールについてはhttp://nokogiri.org/tutorials/installing_nokogiri.htmlにアクセスする必要があります。そのページにアクセスすると、単に使用する必要があると表示されますgem install nokogiri。ただし、これを行うと、同様のエラーが発生します。

同様の質問がここで見つかりましたレール 3.1.0 と ubuntu を使用して Nokogiri 1.5.0 をインストール中にエラーが発生しましたが、Windows を使用しているため、sudo コマンドを使用できません。また、nokogiri の gem devkit (Windows) をインストールするときにこの質問libxml2 が見つからないことを発見し、質問に含まれるコマンドを使用しようとすると、質問に含まれる同じエラー出力が得られました。そこのコメントは役に立たなかったようです。

以下に、nokogiri をインストールする際のエラーの出力全体を含めました。ある種の必須パッケージ/ライブラリをインストールする必要があると推測していますが、その方法がわかりません。これらの gem を適切に機能させるにはどうすればよいですか?

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>
4

1 に答える 1

9

Windows 上の Ruby 2.0.0 と x64 での nokogiri はまだサポートされていないと思います。私は同様の問題を抱えています。

https://github.com/sparklemotion/nokogiri/issues/864にアクセスし、一番下にあるスレッドを「見て」更新を確認してください。

于 2013-03-15T16:42:42.063 に答える