Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Bundle install fails due to nokogiri 1.6.8 problem #227
I notice that some of my Jenkins Mac Mini slaves when running the bundle install command install nokogiri 220.127.116.11, this one which is experiencing the failure is trying to install nokogiri 1.6.8.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Using pkg-config version 1.1.7
Provided configuration options:
Gem files will remain installed in /var/folders/8r/84r5yjgs6g79sncp7rjqflnr0000gq/T/bundler20160609-42888-n8l47cnokogiri-1.6.8/gems/nokogiri-1.6.8 for inspection.
=============== SNIP mkmf.log ==============
package configuration for libxslt is not found
DL is deprecated, please use Fiddle
package configuration for libexslt is not found
"xcrun clang -E -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin14 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/ -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c -o conftest.i"
1 error generated.
You can check out http://buegling.com/blog/2015/4/26/building-nokogiri-on-os-x for some nokogiri installation troubleshooting advice.
@brendangillies I think what I had to do was to force the install of Nokogiri 18.104.22.168 first.
How did you solve this?? Struggling with the same issue but am not able to find the answer here...
I tried xcode-select to choose 7.3.1 instead of xcode-8, but bundle install still failed with the same error.
What worked for me was (with 7.3.1 still selected, 8.0 might have worked) 'brew install libxml2' and then 'gem install nokogiri -v 1.6.8.rc3'. Brew warned about libxml2 already being provided, and said it wasn't going to link it into /usr/local because it was 'keg-only'.
We don't want to upgrade this system to Sierra yet in case Apple's broken yet another part of our set-up.
For Sierra, the following code solved my problem (ERROR: Failed to build gem native extension.)