Skip to content

Instantly share code, notes, and snippets.

@jacquescrocker
Created October 23, 2013 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacquescrocker/7126640 to your computer and use it in GitHub Desktop.
Save jacquescrocker/7126640 to your computer and use it in GitHub Desktop.
WTF
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 \
> --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib \
> --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 \
> --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include \
> --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
Building native extensions with: '--with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib'
This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/jc/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0/configure.log' to see what happened.
*** 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/jc/.rbenv/versions/2.0.0-p247/bin/ruby
/Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.1/lib/mini_portile.rb:251:in `block in execute': Failed to complete configure task (RuntimeError)
from /Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.1/lib/mini_portile.rb:243:in `chdir'
from /Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.1/lib/mini_portile.rb:243:in `execute'
from /Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.1/lib/mini_portile.rb:57:in `configure'
from /Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.1/lib/mini_portile.rb:100:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:119:in `call'
from extconf.rb:119:in `block in <main>'
from extconf.rb:109:in `tap'
from extconf.rb:109:in `<main>'
Gem files will remain installed in /Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.0 for inspection.
Results logged to /Users/jc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
@jacquescrocker
Copy link
Author

where the hell is tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0/configure.log?

@nathantsoi
Copy link

brew tap homebrew/dupes && brew install apple-gcc42 fixed this for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment