77

Could you help me install curl.h library?

Ciro Santilli OurBigBook.com
  • 26,663
  • 14
  • 108
  • 107
  • 1
    There should be a curl-dev (or something like that) package available. –  Nov 11 '11 at 07:26
  • How did you installed the curl package? –  Nov 11 '11 at 07: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. –  Nov 11 '11 at 07:33
  • 1
    @BasileStarynkevitch: Debian does not have `libcurl-dev`. It has `libcurl4-openssl-dev` and `libcurl4-gnutls-dev` and I don't think Ubuntu would differ. –  Nov 11 '11 at 07:37
  • 1
    `libcurl-dev` is a virtual package on Debian. I have it on Debian/Sid. –  Nov 11 '11 at 07:38

1 Answers1

127
apt-get install libcurl4-gnutls-dev

or

apt-get install libcurl4-openssl-dev

or

apt-get install libcurl4-nss-dev

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

Jan Hudec
  • 1,486
  • 1
  • 9
  • 15
  • 35
    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. – Claudi Jan 15 '16 at 08:45
  • 8
    The reason for this divide is a [licensing issue](https://curl.haxx.se/legal/distro-dilemma.html). **The OpenSSL variant is the most tried and tested,** but is not GPL compatible. – Serge Stroobandt Aug 03 '17 at 07:57
  • Is this answer still current? – Zach Smith Aug 11 '17 at 08: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 08:17
  • Why does aptitude offer 2 versions of curl.h? I don't want this burden of choice, I just want to compile a program that depends on curl. – TZubiri Dec 14 '19 at 02:33
  • @TomasZubiri, three, now. If it only depends on a tls implementation indirectly and you are not going to distribute it, pick any. Otherwise you have to pick the legally or technically compatible one. – Jan Hudec Dec 14 '19 at 08:20