C/C++教程

centos7 yum升级curl

本文主要是介绍centos7 yum升级curl,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1 安装libnghttp2.so.14依赖

如升级时提示Requires: libnghttp2.so.14()(64bit)错误

yum install epel-release -y

2 安装curl的repo

wget http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-2.rhel7.noarch.rpm
rpm -ivh city-fan.org-release-2-2.rhel7.noarch.rpm

3 修改[city-fan.org]的enable为1

vim /etc/yum.repos.d/city-fan.org.repo

[city-fan.org]
name=city-fan.org repository for Red Hat Enterprise Linux (and clones) $releasever ($basearch)
#baseurl=http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel$releasever/$basearch
mirrorlist=http://mirror.city-fan.org/ftp/contrib/yum-repo/mirrorlist-rhel$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org

4 更新curl

yum update curl --enablerepo=city-fan.org -y

5 查看curl的版本

curl -V

curl 7.81.0 (x86_64-redhat-linux-gnu) libcurl/7.81.0 NSS/3.67 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.10.0 nghttp2/1.33.0 OpenLDAP/2.4.44
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL UnixSockets

这篇关于centos7 yum升级curl的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!