1

インストールしようとしhpricotていますが、次のエラーが表示されます。xcode はインストールされていますが、他に何が欠けているのかわかりません。

$ gem install hpricot
Building native extensions.  This could take a while...
ERROR:  Error installing hpricot:
    ERROR: Failed to build gem native extension.

        /Users/user_name/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for stdio.h... *** 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
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

        /Users/user_name/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for libxml/parser.h... *** 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.
4

3 に答える 3

1

hpricot はもうサポートされていないと思います。nokogiriを調べる必要があります。これははるかに高速であり、非常によく文書化されています。

編集: hpricot github ページ (https://github.com/hpricot/hpricot/) を確認したところ、nokogiri を使用することも提案されました。

プリコは終了しました。ノコギリのような代替案を検討してください。

編集#2:インストール中にエラーが発生した場合は、自作またはmacportsを介してインストールする必要があるlibxmlおよびその他のライブラリが不足している可能性があります. 必要なすべてのライブラリとインストール手順は、次の場所にあります。

http://nokogiri.org/tutorials/installing_nokogiri.html

于 2012-07-23T01:30:58.383 に答える
0

nokogiri ビルドのエラー メッセージから、libxml または libxml 開発ライブラリがないようです。

于 2012-07-23T01:48:09.503 に答える