Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/usr/bin/ld: cannot find -lcurl

I'm trying to install the ruby gem for curl (curb) on Ubuntu 10.10, but during the installation, I get the error:

/usr/bin/ld: cannot find -lcurl

But curl is installed! apt-get install curl says I've got the newest version. There is no curl-dev either.

I'm getting these kinds of errors all the time, with curl, with libxml, with readline, and I have no idea what's going on. Something is wrong with my installation of Ubuntu, but I don't know what, I don't know where to look, I don't know what to google for, and I don't know how to fix it.

Help would be deeply appreciated.

EDIT: this is in my /usr/lib dir for libcurl:

lrwxrwxrwx  1 root root      19 2011-02-18 23:15 libcurl-gnutls.so.3 -> libcurl-gnutls.so.4
lrwxrwxrwx  1 root root      23 2011-02-18 23:15 libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.2.0
-rw-r--r--  1 root root  339880 2010-06-23 09:07 libcurl-gnutls.so.4.2.0
lrwxrwxrwx  1 root root      12 2011-02-18 23:14 libcurl.so.3 -> libcurl.so.4
lrwxrwxrwx  1 root root      16 2011-02-18 23:14 libcurl.so.4 -> libcurl.so.4.2.0
-rw-r--r--  1 root root  360904 2010-06-23 09:07 libcurl.so.4.2.0
like image 773
Michiel de Mare Avatar asked Feb 27 '11 22:02

Michiel de Mare


1 Answers

You need the libcurl3-dev package. Curl is just the command line utility. The library is libcurl3, and it has a -dev package. (It seems to be a virtual package in Maverick, redirecting to libcurl4-openssl-dev, but that should still work or the virtual package would not have been provided.) Indeed from your lib directory I can see that libcurl3 is merely a symbolic link to libcurl4. (libcurl3-dev may not be available in the future, so use libcurl4-openssl-dev directly).

like image 172
Kevin Cathcart Avatar answered Sep 19 '22 08:09

Kevin Cathcart