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 https://curl.se/download.html I copied the link to the archive with cURL.
I downloaded it and unpacked it:
cd /usr/local/src
ls
rm -rf curl*
wget https://curl.se/download/curl-7.75.0.zip
unzip curl-7.75.0.zip
You can also download the cURL archive from the master branch:
wget https://github.com/curl/curl/archive/master.zip
Changed to the source code directory and installed on the system:
cd curl-7.75.0
./buildconf
./configure --with-ssl
make
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