Introduction to cURL

The cURL package contains an utility and a library used for transferring files with URL syntax to any of the following protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTSP, SMB, SMBS, SMTP, SMPTS, TELNET, and TFTP. Its ability to both download and upload files can be incorporated into other programs to support functions like streaming media.



Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

  • Download (HTTP):

  • Download MD5 sum: 0b0f5de173afd303229e5272689578d7

  • Download size: 2.4 MB

  • Estimated disk space required: 140 MB (add 23 MB for tests)

  • Estimated build time: 0.2 SBU (with parallelism=4; add 16 SBU for tests)

cURL Dependencies



Brotli-1.0.9, c-ares-1.19.0, GnuTLS-3.7.8, libidn2-2.3.4, libpsl-0.21.2, libssh2-1.10.0, MIT Kerberos V5-1.20.1, nghttp2-1.51.0, OpenLDAP-2.6.3, Samba-4.17.5, gsasl, impacket, libmetalink, librtmp, ngtcp2, quiche, and SPNEGO

Optional if Running the Test Suite

stunnel-5.68 (for the HTTPS and FTPS tests) and Valgrind-3.20.0 (this will slow the tests down and may cause failures.)

User Notes:

Installation of cURL

Install cURL by running the following commands:

./configure --prefix=/usr                           \
            --disable-static                        \
            --with-openssl                          \
            --enable-threaded-resolver              \
            --with-ca-path=/etc/ssl/certs &&

To run the test suite, issue: make test. If Samba is installed, the related tests will output a message duplicated many times complaining the Python module impacket (not a part of BLFS) is missing and be skipped.

Now, as the root user:

make install &&

rm -rf docs/examples/.deps &&

find docs \( -name Makefile\* -o -name \*.1 -o -name \*.3 \) -exec rm {} \; &&

install -v -d -m755 /usr/share/doc/curl-7.87.0 &&
cp -v -R docs/*     /usr/share/doc/curl-7.87.0

Simple tests to the new installed curl: curl --trace-ascii debugdump.txt and curl --trace-ascii d.txt --trace-time Inspect the locally created trace files debugdump.txt and d.txt, which contain version downloaded files information, etc. One file has the time for each action logged.

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-threaded-resolver: This switch enables cURL's builtin threaded DNS resolver.

--with-ca-path=/etc/ssl/certs: This switch sets the location of the BLFS Certificate Authority store.

--with-openssl: This parameter chooses OpenSSL as SSL/TLS implementation. This seems mandatory now.

--with-gssapi: This parameter adds Kerberos 5 support to libcurl.

--without-ssl --with-gnutls: Use to build with GnuTLS support instead of OpenSSL for SSL/TLS.

--with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt: Use this switch instead of --with-ca-path if building with GnuTLS support instead of OpenSSL for SSL/TLS.

--with-libssh2: This parameter adds SSH support to cURL. This is disabled by default.

--enable-ares: This parameter adds support for DNS resolution through the c-ares library. It overrides --enable-threaded-resolver and is not widely tested by the editors.

find docs ... -exec rm {} \;: This command removes Makefiles and man files from the documentation directory that would otherwise be installed by the commands that follow.


Installed Programs: curl and curl-config
Installed Library:
Installed Directories: /usr/include/curl and /usr/share/doc/curl-7.87.0

Short Descriptions


is a command line tool for transferring files with URL syntax


prints information about the last compile, like libraries linked to and prefix setting

provides the API functions required by curl and other programs