23

I'm trying to install the curb gem on my Debian machine but I'm having a hard time building the gem with native extensions. I'm using RVM.

Just a list of things I'm using:

  • debian
  • bundler
  • rvm
  • ruby-1.9.2-p180
  • curb

I'm told I have to install the following packages and I've done so:

sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev

When I go ahead and do as such:

gem install curb

Building native extensions.  This could take a while...
ERROR:  Error installing curb:
    ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb

checking for curl-config... yes checking for curlinfo_redirect_time... * 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=/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby --with-curl-dir --with-curl-include --without-curl-include=${curl-dir}/include --with-curl-lib --without-curl-lib=${curl-dir}/lib /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:368:in try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:446:intry_compile' from extconf.rb:51:in block in have_constant' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:693:inblock in checking_for' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in block (2 levels) in postpone' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in block in postpone' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:276:in postpone' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:692:inchecking_for' from extconf.rb:43:in have_constant' from extconf.rb:60:in'

I don't any way around this, any ideas?

Thanks buds.

nelsonjchen
  • 365
  • 6
  • 16
Andrew WC Brown
  • 2,240
  • 5
  • 22
  • 24
  • I'm getting similar problems on OSX installing curb with rvm against a libcurl that previously worked with my own installation of ruby and curb. Did you find any solution? – ian Jun 09 '11 at 01:41
  • Having the same problem on Mountain Lion (OSX 10.8). I have two installations of it, works on the iMac fails on the MBA, I can't see any differences yet. – patm Aug 13 '12 at 07:25

3 Answers3

56

On a Debian Squeeze, I've managed to install curb with libcurl4-openssl-dev installed before.

It may also work with libcurl4-gnutls-dev, but I've no tested.

jlecour
  • 2,905
  • 1
  • 25
  • 24
  • Also, don't forget to sudo gem install curb after you've installed libcurl4-openssl-dev – Flaviu Jan 27 '12 at 19:08
  • 8
    installing `libcurl4-gnutls-dev` instead of `libcurl3-gnutls-dev` worked for me. – iain Mar 07 '12 at 13:32
  • installing libcurl4-gnutls-dev worked for me on Ubuntu 11.04. that package was not listed in Ubuntu dependencies in Curb readme. – Luke W Jul 19 '12 at 17:58
  • 1
    What worked for me was libcurl14-openssl-dev after doing an apt-get update (This is for 12.04) – zippy Jun 13 '13 at 01:52
5

You probably need to install curl-devel package.

yum install curl-devel

randomuser
  • 1,858
  • 2
  • 17
  • 21
  • This worked for me. I'm starting to hate Yum.. every instruction I read on the web tells me to do apt-get. ARGH! – Henley Feb 22 '13 at 03:53
1

openssl used to work for me, but now libcurl4-gnutls-dev is all that works for me...

fringd
  • 2,380
  • 1
  • 18
  • 13