LoginSignup
0
1

More than 5 years have passed since last update.

macOS SierraにNokogiriをインストールするときはlibxml2の別途インストールが必要

Last updated at Posted at 2016-12-19

macOS SierraでNokogiriをインストールしようとしたらlibxml2がらみのエラーが出て失敗しました。

Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.4.tar.gz into tmp/x86_64-apple-darwin16/ports/libxml2/2.9.4... OK
Running 'configure' for libxml2 2.9.4... OK
Running 'compile' for libxml2 2.9.4... ERROR, review '/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.8.1/ext/nokogiri/tmp/x86_64-apple-darwin16/ports/libxml2/2.9.4/compile.log' to see what happened. Last lines are:
========================================================================

brewでlibxml2をインストールし、それを使うようにしたらインストールに成功しました。

brew install libxml2
bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2
bundle update

Fix Nokogiri v1.6.8.1 Installation Failure on macOS Sierra

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1