CentOS升级curl

 1、安装repo

rpm -Uvh  http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm

2、查看该 repo 包含的 curl 版本

yum --showduplicates list curl --disablerepo="*" --enablerepo="city*"

3、修改该repo的enable为1

vi /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 install  -y curl

5、查看curl版本

curl -V

[root@master ~]# rpm -Uvh  http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm
Retrieving http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm
warning: /var/tmp/rpm-tmp.tFavlc: Header V4 DSA/SHA1 Signature, key ID b56a8bac: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:city-fan.org-release-2-1.rhel6   ################################# [100%]
[root@master ~]# yum --showduplicates list curl --disablerepo="*" --enablerepo="city*"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * city-fan.org: www.city-fan.org
 * city-fan.org-source: www.city-fan.org
city-fan.org                                                                                                                          | 3.0 kB  00:00:00
city-fan.org-debuginfo                                                                                                                | 3.0 kB  00:00:00
city-fan.org-source                                                                                                                   | 3.0 kB  00:00:00
(1/3): city-fan.org-debuginfo/7/primary_db                                                                                            |  41 kB  00:00:01
(2/3): city-fan.org-source/7/primary_db                                                                                               | 357 kB  00:00:12
(3/3): city-fan.org/7/primary_db                                                                                                      | 517 kB  00:00:33
Installed Packages
curl.x86_64                                                         7.29.0-59.el7_9.1                                                            @updates
Available Packages
curl.x86_64                                                         7.82.0-2.0.cf.rhel7                                                          city-fan.org
[root@master ~]# vi /etc/yum.repos.d/city-fan.org.repo
[root@master ~]# yum install curl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * city-fan.org: nervion.us.es
http://nervion.us.es/city-fan/yum-repo/rhel7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

city-fan.org                                                                                                                          | 3.0 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package curl.x86_64 0:7.29.0-59.el7_9.1 will be updated
---> Package curl.x86_64 0:7.82.0-2.0.cf.rhel7 will be an update
--> Processing Dependency: libcurl(x86-64) >= 7.82.0-2.0.cf.rhel7 for package: curl-7.82.0-2.0.cf.rhel7.x86_64
--> Running transaction check
---> Package libcurl.x86_64 0:7.29.0-59.el7_9.1 will be updated
---> Package libcurl.x86_64 0:7.82.0-2.0.cf.rhel7 will be an update
--> Processing Dependency: libpsl(x86-64) >= 0.7.0 for package: libcurl-7.82.0-2.0.cf.rhel7.x86_64
--> Processing Dependency: libssh2(x86-64) >= 1.10.0 for package: libcurl-7.82.0-2.0.cf.rhel7.x86_64
--> Processing Dependency: libnghttp2.so.14()(64bit) for package: libcurl-7.82.0-2.0.cf.rhel7.x86_64
--> Processing Dependency: libpsl.so.0()(64bit) for package: libcurl-7.82.0-2.0.cf.rhel7.x86_64
--> Running transaction check
---> Package libnghttp2.x86_64 0:1.33.0-1.1.el7 will be installed
---> Package libpsl.x86_64 0:0.7.0-1.el7 will be installed
--> Processing Dependency: libicudata.so.50()(64bit) for package: libpsl-0.7.0-1.el7.x86_64
--> Processing Dependency: libicuuc.so.50()(64bit) for package: libpsl-0.7.0-1.el7.x86_64
---> Package libssh2.x86_64 0:1.8.0-4.el7 will be updated
---> Package libssh2.x86_64 0:1.10.0-4.0.cf.rhel7 will be an update
--> Running transaction check
---> Package libicu.x86_64 0:50.2-4.el7_7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                            Arch                           Version                                        Repository                            Size
=============================================================================================================================================================
Updating:
 curl                               x86_64                         7.82.0-2.0.cf.rhel7                            city-fan.org                         636 k
Installing for dependencies:
 libicu                             x86_64                         50.2-4.el7_7                                   base                                 6.9 M
 libnghttp2                         x86_64                         1.33.0-1.1.el7                                 epel                                  68 k
 libpsl                             x86_64                         0.7.0-1.el7                                    city-fan.org                          45 k
Updating for dependencies:
 libcurl                            x86_64                         7.82.0-2.0.cf.rhel7                            city-fan.org                         573 k
 libssh2                            x86_64                         1.10.0-4.0.cf.rhel7                            city-fan.org                         134 k

Transaction Summary
=============================================================================================================================================================
Install             ( 3 Dependent packages)
Upgrade  1 Package  (+2 Dependent packages)

Total download size: 8.3 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/6): libnghttp2-1.33.0-1.1.el7.x86_64.rpm                                                                                           |  68 kB  00:00:00
(2/6): libicu-50.2-4.el7_7.x86_64.rpm                                                                                                 | 6.9 MB  00:00:00
warning: /var/cache/yum/x86_64/7/city-fan.org/packages/curl-7.82.0-2.0.cf.rhel7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID b56a8bac: NOKEY00:00:12 ETA
Public key for curl-7.82.0-2.0.cf.rhel7.x86_64.rpm is not installed
(3/6): curl-7.82.0-2.0.cf.rhel7.x86_64.rpm                                                                                            | 636 kB  00:00:34
(4/6): libpsl-0.7.0-1.el7.x86_64.rpm                                                                                                  |  45 kB  00:00:02
(5/6): libssh2-1.10.0-4.0.cf.rhel7.x86_64.rpm                                                                                         | 134 kB  00:00:08
(6/6): libcurl-7.82.0-2.0.cf.rhel7.x86_64.rpm                                                                                         | 573 kB  00:00:47
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        178 kB/s | 8.3 MB  00:00:47
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org
Importing GPG key 0xB56A8BAC:
 Userid     : "city-fan.org software librarian <software@city-fan.org>"
 Fingerprint: 2f04 deae a32c 0963 b696 9a95 e0be 69c9 b56a 8bac
 Package    : city-fan.org-release-2-1.rhel6.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : libnghttp2-1.33.0-1.1.el7.x86_64                                                                                                          1/9
  Installing : libicu-50.2-4.el7_7.x86_64                                                                                                                2/9
  Installing : libpsl-0.7.0-1.el7.x86_64                                                                                                                 3/9
  Updating   : libssh2-1.10.0-4.0.cf.rhel7.x86_64                                                                                                        4/9
  Updating   : libcurl-7.82.0-2.0.cf.rhel7.x86_64                                                                                                        5/9
  Updating   : curl-7.82.0-2.0.cf.rhel7.x86_64                                                                                                           6/9
  Cleanup    : curl-7.29.0-59.el7_9.1.x86_64                                                                                                             7/9
  Cleanup    : libcurl-7.29.0-59.el7_9.1.x86_64                                                                                                          8/9
  Cleanup    : libssh2-1.8.0-4.el7.x86_64                                                                                                                9/9
  Verifying  : libssh2-1.10.0-4.0.cf.rhel7.x86_64                                                                                                        1/9
  Verifying  : libcurl-7.82.0-2.0.cf.rhel7.x86_64                                                                                                        2/9
  Verifying  : libpsl-0.7.0-1.el7.x86_64                                                                                                                 3/9
  Verifying  : libicu-50.2-4.el7_7.x86_64                                                                                                                4/9
  Verifying  : curl-7.82.0-2.0.cf.rhel7.x86_64                                                                                                           5/9
  Verifying  : libnghttp2-1.33.0-1.1.el7.x86_64                                                                                                          6/9
  Verifying  : curl-7.29.0-59.el7_9.1.x86_64                                                                                                             7/9
  Verifying  : libssh2-1.8.0-4.el7.x86_64                                                                                                                8/9
  Verifying  : libcurl-7.29.0-59.el7_9.1.x86_64                                                                                                          9/9

Dependency Installed:
  libicu.x86_64 0:50.2-4.el7_7                      libnghttp2.x86_64 0:1.33.0-1.1.el7                      libpsl.x86_64 0:0.7.0-1.el7

Updated:
  curl.x86_64 0:7.82.0-2.0.cf.rhel7

Dependency Updated:
  libcurl.x86_64 0:7.82.0-2.0.cf.rhel7                                          libssh2.x86_64 0:1.10.0-4.0.cf.rhel7

Complete!
[root@master ~]# curl -V
curl 7.82.0 (x86_64-redhat-linux-gnu) libcurl/7.82.0 NSS/3.53.1 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-03-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

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值