Skip to content

Addition of libxml2 dependency in the preparation steps

I came across the following error while installing the develoment kit locally on macOS Sierra (using brew).

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/pkoro/.rvm/gems/ruby-2.4.0/gems/nokogiri-1.6.8.1/ext/nokogiri
/Users/pkoro/.rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20170404-60387-f3y1e7.rb extconf.rb --use-system-libraries
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using system libraries.
ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
*** extconf.rb failed ***

The weird thing is I had done all the preparation steps in the documentation (including the installation of the pkg-config package). I could work around the issue by installing explicitly libxml2 with brew install ... (hence the proposed change).

Merge request reports