Skip to content

Instantly share code, notes, and snippets.

@steveadams
Created May 6, 2019 12:36
Show Gist options
  • Save steveadams/f13a90420df8e83e99578e1558c1adf2 to your computer and use it in GitHub Desktop.
Save steveadams/f13a90420df8e83e99578e1558c1adf2 to your computer and use it in GitHub Desktop.
Steves-MacBook-Air:dock steve$ gem install nokogiri -v '1.9.1' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/nokogiri-1.9.1/ext/nokogiri
/Users/steve/.rbenv/versions/2.6.2/bin/ruby -I /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0 -r ./siteconf20190506-31762-hxs46y.rb extconf.rb
checking if the C compiler accepts ... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/steve/.rbenv/versions/2.6.2/bin/$(RUBY_BASE_NAME)
--help
--clean
/Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:532:in `with_werror'
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from extconf.rb:138:in `nokogiri_try_compile'
from extconf.rb:162:in `block in add_cflags'
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:643:in `with_cflags'
from extconf.rb:161:in `add_cflags'
from extconf.rb:412:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0-static/nokogiri-1.9.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/nokogiri-1.9.1 for inspection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment