1、查看当前版本
# 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、下载curl 8.4.0:
https://curl.se/download/curl-8.4.0.tar.gz
3、编译安装curl8.4.0文章来源:https://www.toymoban.com/news/detail-765331.html
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
安装后再次检查升级后版本情况文章来源地址https://www.toymoban.com/news/detail-765331.html
# 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
到了这里,关于Linux CentOS 7升级curl8.4.0使用编译安装方式的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!