Monday, December 14, 2009

installing curb on ubuntu 8.1

i switched over from Net::HTTP to the curb gem (curl bindings for ruby) so i could take advantage of the performance gains (TBD) and that it keeps connections open by default.

on my local os x machine, i just ran:

sudo gem install curb

and everything worked fine. however, when deploying to our dev ubuntu box, it was not as smooth a process. when running gem install, i got the following error.

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

/usr/bin/ruby1.8 extconf.rb install curb
"-fno-strict-aliasing -g -g -O2 -fPIC $(cflags)"
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=/usr/bin/ruby1.8
--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:19: 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.


Gem files will remain installed in /var/lib/gems/1.8/gems/curb-0.6.0.0 for inspection.
Results logged to /var/lib/gems/1.8/gems/curb-0.6.0.0/ext/gem_make.out

after some googling, i determined that i probably needed the libcurl4-openssl-dev package, so i ran the following:

sudo apt-get install libcurl4-openssl-dev

that resulted in:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libidn11-dev libldap-2.4-2 libldap2-dev pkg-config
Suggested packages:
libcurl3-dbg
The following NEW packages will be installed:
libcurl4-openssl-dev libidn11-dev libldap2-dev pkg-config
The following packages will be upgraded:
libldap-2.4-2
1 upgraded, 4 newly installed, 0 to remove and 25 not upgraded.
Need to get 1115kB/2678kB of archives.
After this operation, 7115kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://archive.ubuntu.com intrepid-updates/main libldap-2.4-2 2.4.11-0ubuntu6.1
404 Not Found [IP: 91.189.88.30 80]
Err http://archive.ubuntu.com intrepid-updates/main libldap2-dev 2.4.11-0ubuntu6.1
404 Not Found [IP: 91.189.88.30 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.4-2_2.4.11-0ubuntu6.1_amd64.deb 404 Not Found [IP: 91.189.88.30 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap2-dev_2.4.11-0ubuntu6.1_amd64.deb 404 Not Found [IP: 91.189.88.30 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

as it turned out, my sources were out of date and when apt-get went looking for the libldap2 packages it needed, they were not there. so i ran:

sudo apt-get update

it updated my sources and i was able to install the libcurl4-openssl-dev package and succesfully install the curb gem. maybe that will help somebody out there.

5 comments:

Anonymous said...

scaled adco invent mosaic behalf horner kdre impact seldom minutes discarded
lolikneri havaqatsu

Anonymous said...

Yes undoubtedly, in some moments I can bruit about that I acquiesce in with you, but you may be in the light of other options.
to the article there is quiet a question as you did in the go over like a lead balloon a fall in love with delivery of this demand www.google.com/ie?as_q=arles image web page creator 7.2.0.1616 ?
I noticed the axiom you suffer with not used. Or you partake of the dark methods of development of the resource. I possess a week and do necheg

Nik said...

Your post help me solve my issue of not being able to install Patron! Thanks

Anonymous said...

get facebook likes
buy facebook likes

http://thedaringkitchen.com/in-the-kitchen/new-and-improved-faq-different-location http://www.salesandmarketing.com/article/talk-money
facebook likes 1000 facebook likes get facebook likes
Unless hackers and viruses have turned a new leaf what did I do that fixed my pc. It was glitching every so often the programs would say not responding and have a white film over them I couldn't do nothing I did the following. Scanned for viruses with Nod 32 scanned with spy bot (found faults) scanned with pc utillities (found faults) I also booted and tryed fixing with the windows cd the final thing I tried was to boot in safe mode which was the last thing I did and it started working so was it the safe mode and the only thing I can see altering is the visual display. did this fix my pc. Just dont want to do it again thaTS ALL

get facebook likes buy facebook likes [url=http://1000fbfans.info]buy facebook likes [/url] 1000 facebook likes

Anonymous said...

You could use incremental body weight improves to progressively raise your power.


Look at my web-site: Metal dumbbells