查看版本:curl -V
curl 8.0.1 (x86_64-redhat-linux-gnu) libcurl/8.0.1 NSS/3.44 zlib/1.2.7 libpsl/0.20.2 (+libidn2/2.3.2) libssh2/1.10.0 nghttp2/1.33.0
1. 新增 repo:vim /etc/yum.repos.d/city-fan-for-curl.repo
内容为:
[CityFanforCurl]
name=City Fan Repo
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
enabled=0
gpgcheck=0
2. 更新 curl
直接使用如下命令进行更新:yum update curl --enablerepo=CityFanforCurl -y
报错:CentOS7升级curl报错:Requires: libnghttp2.so.14()(64bit)
1、更新: yum update nss nss-util nss-sysinit nss-tools
2、安装 epel 源: yum install epel-release -y
yum --enablerepo=epel install libnghttp2 -y && yum install libcurl -y
# 再次执行 yum update curl --enablerepo=CityFanforCurl -y