I came across the following error while installing the develoment kit locally on macOS Sierra (using
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/pkoro/.rvm/gems/ruby-2.4.0/gems/nokogiri-22.214.171.124/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
brew install ... (hence the proposed change).