-
-
Save IanVaughan/5a23f15b7f72977e3a9b to your computer and use it in GitHub Desktop.
Installing patron 0.4.20 with native extensions | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/home/ubuntu/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151121-13137-yck58r.rb extconf.rb | |
checking for curl-config... no | |
checking for main() in -lcurl... no | |
*** 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=/home/ubuntu/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME) | |
--with-curl-dir | |
--without-curl-dir | |
--with-curl-include | |
--without-curl-include=${curl-dir}/include | |
--with-curl-lib | |
--without-curl-lib=${curl-dir}/lib | |
--with-curllib | |
--without-curllib | |
extconf.rb:34:in `<main>': Can't find libcurl or curl/curl.h (RuntimeError) | |
Try passing --with-curl-dir or --with-curl-lib and --with-curl-include | |
options to extconf. | |
extconf failed, exit code 1 | |
Gem files will remain installed in /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/patron-0.4.20 for inspection. | |
Results logged to /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/patron-0.4.20/gem_make.out | |
An error occurred while installing patron (0.4.20), and Bundler cannot continue. | |
Make sure that `gem install patron -v '0.4.20'` succeeds before bundling. |
@IanVaughan
@bakeris
Yikes!
Thank you soooooo much for this article. Whew! I was going insane.
So how on earth is anybody supposed to figure that out? when their patron gem install fails?
Could you explain how you knew this library was the culprit? So I might be able to live one more day in the event that I am unable to stumble upon the appropriate Google result?
Cheers again
@bakeris you safe me
This didn't fix my issue. But following lines did:
sudo apt remove -y libcurl4
sudo apt install -y libcurl4 curl libcurl4-openssl-dev
Fix that worked for me with Homebrew + macOS
brew reinstall openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
bundle
I wonder what should I install on Alpine Linux.
UPD: apk add ruby-dev curl-dev build-base
sudo apt-get install libcurl3-dev
This should fix it
Thanks 👍
for centos 7
$ yum install libcurl-devel
thanks for your response it worked for me!
@gabbio work for me, thank's
@gabbio work for me, thank's
@bakeris Thanks! Got this issue and fixed it for me as well.