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: FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. Its ability to both download and upload files can be incorporated into other programs to support functions like streaming media.

This package is known to build and work properly using an LFS-8.1 platform.

Package Information

  • Download (HTTP):

  • Download MD5 sum: 18ebc36c5dc9317d4a0b5db94a4e12ad

  • Download size: 2.2 MB

  • Estimated disk space required: 36 MB (add 11 MB for tests)

  • Estimated build time: 0.3 SBU (add 3.2 SBU for tests)

cURL Dependencies



c-ares-1.12.0, GnuTLS-3.6.0, libidn2-2.0.4, MIT Kerberos V5-1.15.2, nghttp2-1.26.0, OpenLDAP-2.4.45, Samba-4.7.0, libmetalink, libpsl, librtmp, libssh2, mbed TLS (formerly known as PolarSSL), and SPNEGO

Optional for Running the Test Suite

stunnel-5.42 (for the HTTPS and FTPS tests) and Valgrind-3.13.0

User Notes:

Installation of cURL

Install cURL by running the following commands:

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


To run the tests for this package, valgrind requires a version of the /lib/ (or later) library with debugging symbols present.

Current versions of LFS does not strip /lib/ but previous versions of LFS stripped these debugging symbols at the end of Chapter 6. To get this library on oldeer systems, glibc must be rebuilt with the current glibc version using the same compiler that was used to build LFS. The can then be renamed to and copied to /lib. Then a symlink needs to be changed:

ln -sfv /lib/

Adjust the above instruction as needed for a 32-bit system or for a different version of glibc.

To run the test suite, issue: make test. Many tests may fail that depend on optional dependencies that may not be installed.

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.56.0 &&
cp -v -R docs/*     /usr/share/doc/curl-7.56.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 Certificates.

--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/ssl/ca-bundle.crt: Use this switch instead of --with-ca-path if building with GnuTLS support instead of OpenSSL for SSL/TLS.

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

Last updated on 2017-10-10 12:51:25 -0500