From: Xeno Campanoli / Eskimo North and Gmail Date: 2010-05-19T08:01:50+09:00 Subject: Re: curl library? Well, I got that -dev thing installed with apt-get, and then I tried again and got this log: find_executable: checking for curl-config... -------------------- no -------------------- have_library: checking for main() in -lcurl... -------------------- no "gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lcurl -lpthread -lrt -ldl -lcrypt -lm -lc" /usr/bin/ld: cannot find -lcurl collect2: ld returned 1 exit status checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; } /* end */ "gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lcurl -lpthread -lrt -ldl -lcrypt -lm -lc" /usr/bin/ld: cannot find -lcurl collect2: ld returned 1 exit status checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { main(); return 0; } /* end */ -------------------- and then this one: /usr/bin/ruby1.8 extconf.rb "-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. On 10-05-18 03:05 PM, Luis Parravicini wrote: > On Tue, May 18, 2010 at 6:56 PM, Xeno Campanoli / Eskimo North and > Gmail wrote: >> On 10-05-18 02:35 PM, Xeno Campanoli / Eskimo North and Gmail wrote: >>> >>> Two questions: >>> >>> 1. How do I install the curl library for Ruby? I thought there was >>> one...??? >>> 2. How come when I go 'gem search curl' I get: >>> >>>> root@rockhopper:~# gem search curl >>>> >>>> *** LOCAL GEMS *** >>>> >>>> >>>> root@rockhopper:~# >>> >>> ??? >>> >> I just got the following responses trying to install curb and curl-multi: >> >> # gem install curl-multi >> Building native extensions. This could take a while... >> ERROR: Error installing curl-multi: >> ERROR: Failed to build gem native extension. >> >> /usr/bin/ruby1.8 extconf.rb >> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) >> from extconf.rb:1 >> >> >> Gem files will remain installed in /var/lib/gems/1.8/gems/curb-0.7.1 for >> inspection. >> Results logged to /var/lib/gems/1.8/gems/curb-0.7.1/ext/gem_make.out >> root@rhaptools:~# gem install curb >> 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 >> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) >> from extconf.rb:1 >> >> >> Gem files will remain installed in /var/lib/gems/1.8/gems/curb-0.7.1 for >> inspection. >> Results logged to /var/lib/gems/1.8/gems/curb-0.7.1/ext/gem_make.out > > You should try to search the forum first for the answer: > http://www.google.com/search?hl=en&q=`require'%3A+no+such+file+to+load+--+mkmf+(LoadError)+site%3Aruby-forum.com > Anyway, you need the ruby development packages. In ubuntu / debian its > named ruby1.8-dev (or ruby1.9-dev) > > Bye > > -- "It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member