60

This question already has an answer here:

Could you help me install curl.h library?

marked as duplicate by David Foerster, Eric Carvalho, Fabby, Thomas, Melebius Jul 16 '18 at 12:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Nov 11 '11 at 7:53

This question came from our site for professional and enthusiast programmers.

  • 1
    There should be a curl-dev (or something like that) package available. – mu is too short Nov 11 '11 at 7:26
  • How did you installed the curl package? – Tio Pepe Nov 11 '11 at 7:27
  • 1
    sudo aptitude install libcurl-dev is the command to install libcurl on Ubuntu. Unless you have particular reasons, I suggest using the package provided by your distribution, not to install by hand. – Basile Starynkevitch Nov 11 '11 at 7:33
  • @BasileStarynkevitch: Debian does not have libcurl-dev. It has libcurl4-openssl-dev and libcurl4-gnutls-dev and I don't think Ubuntu would differ. – Jan Hudec Nov 11 '11 at 7:37
  • 1
    libcurl-dev is a virtual package on Debian. I have it on Debian/Sid. – Basile Starynkevitch Nov 11 '11 at 7:38
103
apt-get install libcurl4-gnutls-dev

or

apt-get install libcurl4-openssl-dev

depending on whether you want to use gnutls or openssl for SSL.

  • 30
    Only improvement to this answer would be to explain why you would choose one over the other. – Dobes Vandermeer Mar 31 '14 at 18:49
  • 1
    @DobesVandermeer, please could you explain that? I don't know the actual benefits of using one lib or the other. – Claudix Jan 15 '16 at 8:45
  • 8
    The reason for this divide is a licensing issue. The OpenSSL variant is the most tried and tested, but is not GPL compatible. – Serge Stroobandt Aug 3 '17 at 7:57
  • Is this answer still current? – Zach Smith Aug 11 '17 at 8:12
  • 1
    @ZachSmith, yes, it is. And is expected to remain so for many more years, except perhaps the number 4 in the package name might be replaced with higher one. – Jan Hudec Aug 11 '17 at 8:17