21

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?

mdpc
  • 11,856
  • 28
  • 53
  • 67
Pablo Marin-Garcia
  • 313
  • 1
  • 2
  • 7
  • 3
    I would guess the biggest end-user difference between gnutls/nss is probably the license. As for the curl3 to curl4, this may be your answer. http://lists.debian.org/debian-release/2007/04/msg00292.html – Zoredache Nov 17 '11 at 00:06
  • Is anyone going to provide an actual answer here? – Bruce Becker Nov 04 '18 at 11:30
  • here some useful answers https://serverfault.com/questions/348815/how-to-change-libcurl-ssl-backend-from-gnutls-to-openssl-on-ubuntu-server – Sergey Ponomarev Jul 23 '22 at 14:39
  • https://stackoverflow.com/questions/21156604/difference-between-curl-curl-h-libcurl-libcurl4-openssl-dev-libcurl4-nss-dev – Sergey Ponomarev Jul 23 '22 at 15:03
  • So in short the libcurl4 is compiled by default with support of all backends but it dynamically selects an installed backend https://curl.se/mail/lib-2017-08/0118.html – Sergey Ponomarev Jul 23 '22 at 15:13

1 Answers1

9

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).

sleske
  • 10,009
  • 4
  • 34
  • 44