blank
blank
发布于 2019-09-12 / 634 阅读 / 0 评论 / 0 点赞

yum updat curl 到官方最新版本

官方自带的源太旧了 官方已经到7.65

curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 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 unix-sockets

导入源

rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
获取http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
警告:/var/tmp/rpm-tmp.GuS3r8: 头V4 DSA/SHA1 Signature, 密钥 ID b56a8bac: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:city-fan.org-release-2-1.rhel7   ################################# [100%]

启用源 把 [city-fan.org] 中的 enabled=0 改为 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=0 !!!!(把0改为1)!!!!
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org

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

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

查看软件信息

[root@node51 yum.repos.d]# yum info curl
已加载插件:fastestmirror
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * city-fan.org: cityfan.mirror.digitalpacific.com.au
 * elrepo: hkg.mirror.rackspace.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                           | 3.6 kB  00:00:00     
city-fan.org                                                                                                                   | 3.0 kB  00:00:00     
docker-ce-stable                                                                                                               | 3.5 kB  00:00:00     
elrepo                                                                                                                         | 2.9 kB  00:00:00     
epel                                                                                                                           | 5.4 kB  00:00:00     
extras                                                                                                                         | 3.4 kB  00:00:00     
updates                                                                                                                        | 3.4 kB  00:00:00     
(1/11): base/7/x86_64/group_gz                                                                                                 | 166 kB  00:00:00     
(2/11): base/7/x86_64/primary_db                                                                                               | 6.0 MB  00:00:00     
(3/11): elrepo/primary_db                                                                                                      | 425 kB  00:00:00     
(4/11): epel/x86_64/group_gz                                                                                                   |  88 kB  00:00:00     
(5/11): docker-ce-stable/x86_64/updateinfo                                                                                     |   55 B  00:00:00     
(6/11): docker-ce-stable/x86_64/primary_db                                                                                     |  34 kB  00:00:00     
(7/11): epel/x86_64/updateinfo                                                                                                 | 1.0 MB  00:00:00     
(8/11): extras/7/x86_64/primary_db                                                                                             | 215 kB  00:00:00     
(9/11): updates/7/x86_64/primary_db                                                                                            | 7.4 MB  00:00:01     
(10/11): epel/x86_64/primary_db                                                                                                | 6.8 MB  00:00:01     
(11/11): city-fan.org/7/primary_db                                                                                             | 503 kB  00:00:04     
已安装的软件包
名称    :curl
架构    :x86_64
版本    :7.29.0
发布    :51.el7_6.3
大小    :528 k
源    :installed
来自源:updates
简介    : A utility for getting files from remote servers (FTP, HTTP, and others)
网址    :http://curl.haxx.se/
协议    : MIT
描述    : curl is a command line tool for transferring data with URL syntax, supporting
         : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
         : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
         : uploading, HTTP form based upload, proxies, cookies, user+password
         : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
         : resume, proxy tunneling and a busload of other useful tricks.

可安装的软件包
名称    :curl
架构    :x86_64
版本    :7.65.3
发布    :4.0.cf.rhel7
大小    :559 k
源    :city-fan.org/7
简介    : Utility for getting files from remote servers (FTP, HTTP, and others)
网址    :https://curl.haxx.se/
协议    : MIT
描述    : curl is a command line tool for transferring data with URL syntax, supporting
         : FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
         : SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
         : uploading, HTTP form based upload, proxies, cookies, user+password
         : authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
         : resume, proxy tunneling and a busload of other useful tricks.

确认源 OK 可以更新

yum update curl
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * city-fan.org: cityfan.mirror.digitalpacific.com.au
 * elrepo: hkg.mirror.rackspace.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 curl.x86_64.0.7.29.0-51.el7_6.3 将被 升级
---> 软件包 curl.x86_64.0.7.65.3-4.0.cf.rhel7 将被 更新
--> 正在处理依赖关系 libcurl(x86-64) >= 7.65.3-4.0.cf.rhel7,它被软件包 curl-7.65.3-4.0.cf.rhel7.x86_64 需要
--> 正在处理依赖关系 libmetalink.so.3()(64bit),它被软件包 curl-7.65.3-4.0.cf.rhel7.x86_64 需要
--> 正在检查事务
---> 软件包 libcurl.x86_64.0.7.29.0-51.el7_6.3 将被 升级
---> 软件包 libcurl.x86_64.0.7.65.3-4.0.cf.rhel7 将被 更新
--> 正在处理依赖关系 libpsl(x86-64) >= 0.7.0,它被软件包 libcurl-7.65.3-4.0.cf.rhel7.x86_64 需要
--> 正在处理依赖关系 libssh2(x86-64) >= 1.9.0,它被软件包 libcurl-7.65.3-4.0.cf.rhel7.x86_64 需要
--> 正在处理依赖关系 libnghttp2.so.14()(64bit),它被软件包 libcurl-7.65.3-4.0.cf.rhel7.x86_64 需要
--> 正在处理依赖关系 libpsl.so.0()(64bit),它被软件包 libcurl-7.65.3-4.0.cf.rhel7.x86_64 需要
---> 软件包 libmetalink.x86_64.0.0.1.3-9.rhel7 将被 安装
--> 正在检查事务
---> 软件包 libnghttp2.x86_64.0.1.31.1-2.el7 将被 安装
---> 软件包 libpsl.x86_64.0.0.7.0-1.el7 将被 安装
---> 软件包 libssh2.x86_64.0.1.4.3-12.el7_6.3 将被 升级
---> 软件包 libssh2.x86_64.0.1.9.0-2.0.cf.rhel7 将被 更新
--> 解决依赖关系完成

依赖关系解决

======================================================================================================================================================
 Package                           架构                         版本                                         源                                  大小
======================================================================================================================================================
正在更新:
 curl                              x86_64                       7.65.3-4.0.cf.rhel7                          city-fan.org                       559 k
为依赖而安装:
 libmetalink                       x86_64                       0.1.3-9.rhel7                                city-fan.org                        26 k
 libnghttp2                        x86_64                       1.31.1-2.el7                                 epel                                67 k
 libpsl                            x86_64                       0.7.0-1.el7                                  city-fan.org                        45 k
为依赖而更新:
 libcurl                           x86_64                       7.65.3-4.0.cf.rhel7                          city-fan.org                       521 k
 libssh2                           x86_64                       1.9.0-2.0.cf.rhel7                           city-fan.org                       129 k

事务概要
======================================================================================================================================================
安装           ( 3 依赖软件包)
升级  1 软件包 (+2 依赖软件包)

总下载量:1.3 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/6): libnghttp2-1.31.1-2.el7.x86_64.rpm                                                                                      |  67 kB  00:00:00     
libmetalink-0.1.3-9.rhel7.x86_ FAILED                                          
http://nervion.us.es/city-fan/yum-repo/rhel7/x86_64/libmetalink-0.1.3-9.rhel7.x86_64.rpm: [Errno 14] curl#7 - "Failed connect to nervion.us.es:80; Connection refused"
正在尝试其它镜像。
libcurl-7.65.3-4.0.cf.rhel7.x8 FAILED                                          
http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/libcurl-7.65.3-4.0.cf.rhel7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found  --:--:-- ETA 
正在尝试其它镜像。
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/.

警告:/var/cache/yum/x86_64/7/city-fan.org/packages/libssh2-1.9.0-2.0.cf.rhel7.x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID b56a8bac: NOKEY:00:37 ETA 
libssh2-1.9.0-2.0.cf.rhel7.x86_64.rpm 的公钥尚未安装
(2/6): libssh2-1.9.0-2.0.cf.rhel7.x86_64.rpm                                                                                   | 129 kB  00:00:01     
(3/6): curl-7.65.3-4.0.cf.rhel7.x86_64.rpm                                                                                     | 559 kB  00:00:01     
(4/6): libmetalink-0.1.3-9.rhel7.x86_64.rpm                                                                                    |  26 kB  00:00:00     
(5/6): libcurl-7.65.3-4.0.cf.rhel7.x86_64.rpm                                                                                  | 521 kB  00:00:00     
(6/6): libpsl-0.7.0-1.el7.x86_64.rpm                                                                                           |  45 kB  00:00:02     
------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                  487 kB/s | 1.3 MB  00:00:02     
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org 检索密钥
导入 GPG key 0xB56A8BAC:
 用户ID     : "city-fan.org software librarian <[email protected]>"
 指纹       : 2f04 deae a32c 0963 b696 9a95 e0be 69c9 b56a 8bac
 软件包     : city-fan.org-release-2-1.rhel7.noarch (installed)
 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org
是否继续?[y/N]:y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。
  正在安装    : libpsl-0.7.0-1.el7.x86_64                                                                                                         1/9 
  正在更新    : libssh2-1.9.0-2.0.cf.rhel7.x86_64                                                                                                 2/9 
  正在安装    : libmetalink-0.1.3-9.rhel7.x86_64                                                                                                  3/9 
  正在安装    : libnghttp2-1.31.1-2.el7.x86_64                                                                                                    4/9 
  正在更新    : libcurl-7.65.3-4.0.cf.rhel7.x86_64                                                                                                5/9 
  正在更新    : curl-7.65.3-4.0.cf.rhel7.x86_64                                                                                                   6/9 
  清理        : curl-7.29.0-51.el7_6.3.x86_64                                                                                                     7/9 
  清理        : libcurl-7.29.0-51.el7_6.3.x86_64                                                                                                  8/9 
  清理        : libssh2-1.4.3-12.el7_6.3.x86_64                                                                                                   9/9 
  验证中      : curl-7.65.3-4.0.cf.rhel7.x86_64                                                                                                   1/9 
  验证中      : libnghttp2-1.31.1-2.el7.x86_64                                                                                                    2/9 
  验证中      : libmetalink-0.1.3-9.rhel7.x86_64                                                                                                  3/9 
  验证中      : libcurl-7.65.3-4.0.cf.rhel7.x86_64                                                                                                4/9 
  验证中      : libssh2-1.9.0-2.0.cf.rhel7.x86_64                                                                                                 5/9 
  验证中      : libpsl-0.7.0-1.el7.x86_64                                                                                                         6/9 
  验证中      : libssh2-1.4.3-12.el7_6.3.x86_64                                                                                                   7/9 
  验证中      : curl-7.29.0-51.el7_6.3.x86_64                                                                                                     8/9 
  验证中      : libcurl-7.29.0-51.el7_6.3.x86_64                                                                                                  9/9 

作为依赖被安装:
  libmetalink.x86_64 0:0.1.3-9.rhel7                  libnghttp2.x86_64 0:1.31.1-2.el7                  libpsl.x86_64 0:0.7.0-1.el7                 

更新完毕:
  curl.x86_64 0:7.65.3-4.0.cf.rhel7                                                                                                                   

作为依赖被升级:
  libcurl.x86_64 0:7.65.3-4.0.cf.rhel7                                       libssh2.x86_64 0:1.9.0-2.0.cf.rhel7                                      

完毕!

确认更新版本

curl -V
curl 7.65.3 (x86_64-redhat-linux-gnu) libcurl/7.65.3 NSS/3.36 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.9.0 nghttp2/1.31.1
Release-Date: 2019-07-19
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL UnixSockets

Done


评论