Linux CentOS 7 upgrade curl8.4.0 using compilation and installation method

1. View the current version

# curl --version  
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.19.1 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz

2. Download curl 8.4.0:
https://curl.se/download/curl-8.4.0.tar.gz
3. Compile and install curl8.4.0

tar -zxf curl-8.4.0.tar.gz
cd curl-8.4.0
./configure --prefix=/usr/local/curl  --without-ssl
sudo make
sudo make install
chmod 755 -R /usr/local/curl
chmod 755 /usr/bin/curl
mv /usr/bin/curl{,.bak20231015}
cp /usr/local/curl/bin/curl /usr/bin/curl
cp /etc/profile{,.bak20231015}
echo "export PATH=\$PATH:/usr/local/curl/bin" >> /etc/profile
source /etc/profile

After installation, check the upgraded version again.

# curl --version
curl 8.4.0 (x86_64-pc-linux-gnu) libcurl/8.4.0 zlib/1.2.7
Release-Date: 2023-10-11
Protocols: dict file ftp gopher http imap mqtt pop3 rtsp smtp telnet tftp
Features: alt-svc AsynchDNS IPv6 Largefile libz UnixSockets

Guess you like

Origin blog.csdn.net/change_can/article/details/133845582