14

For a software that I am installing in an ubuntu server, it needs the curl deb packages. When I try to install libcurl4-dev it says that this is a virtual package and I need to install libcurl4-gnutls-dev or libcurl4-nss-dev. What is the difference between installing one or the other?

PS: Is there any big difference between installing libcurl3 or libcurl4?

4

When I try to install libcurl4-dev it says that this is a virtual package and I need to install libcurl4-gnutls-dev or libcurl4-nss-dev. What is the difference between installing one or the other?

Both provide the same functionality, just using different libraries.

Background:

cURL supports the use of Transport Layer Security (TLS, aka SSL) for data transfers. Since implementing TLS is quite tricky, cURL delegates this to an external library. cURL supports several different libraries for this purpose, and you need to select one when building it (see how to install curl and libcurl, section "Select TLS backend"). The most popular options to use as the TLS library are:

Which one you choose depends on several factors (licensing, performance, exact feature set, such as supported crypto algorithms...), but they all mostly provide the same functionality.

Ubuntu wants to allow people to choose which variant of cURL they want to use, so they build cURL againts different TLS libraries, and offer them as separate packages. As of Ubuntu bionic (18.04LTS), the variants are:

  • libcurl4-gnutls-dev
  • libcurl4-nss-dev
  • libcurl4-openssl-dev

So, install the right variant for the TLS library you want to use. If you have no particular preference, install the default variant (which uses OpenSSL).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.