Created
November 21, 2015 14:46
-
-
Save IanVaughan/5a23f15b7f72977e3a9b to your computer and use it in GitHub Desktop.
patron gem fail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
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
sudo apt install -y libcurl4 curl libcurl4-openssl-dev
did it for me on ubuntu 22.04 with ruby 2.6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@bakeris you safe me