Skip to content

Instantly share code, notes, and snippets.

@IanVaughan
Created November 21, 2015 14:46
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanVaughan/5a23f15b7f72977e3a9b to your computer and use it in GitHub Desktop.
Save IanVaughan/5a23f15b7f72977e3a9b to your computer and use it in GitHub Desktop.
patron gem fail
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.
@M-Abdullah-11
Copy link

M-Abdullah-11 commented Jan 31, 2023

@gabbio

sudo apt-get install libcurl3-dev This should fix it

Thanks, man

@Nibuitoni
Copy link

@gabbio work for me, thank's

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