How to compile cURL on Ubuntu

Once it was necessary to compile the newest version of cURL, because there was a bug in the standard version from the Ubuntu Server 20.04 repository, and in the new version it was fixed.

So I switched to the root user and completely removed the installed cURL:

sudo -i
apt purge curl

Installed the required components for building cURL from source:

apt install libssl-dev autoconf libtool make

On the official site I copied the link to the archive with cURL.

I downloaded it and unpacked it:

cd /usr/local/src
rm -rf curl*

You can also download the cURL archive from the master branch:


Changed to the source code directory and installed on the system:

cd curl-7.75.0
./configure --with-ssl
make install
mv /usr/bin/curl /usr/bin/curl.bak
cp /usr/local/bin/curl /usr/bin/curl

Checked the cURL version:

curl -V

See also my articles:
How to enable PHP-cURL
The reboot script of Wi-Fi routers TP-Link
The Asus router reboot script

Leave a comment

Leave a Reply