Centos7.3 升级curl 到 7.69.1后出现异常,如何回退

启用 city-fan repo,可以升级 curl 到 7.69版本。
但是,升级curl到7.69.1,之后发现curl无法访问 https 协议的地址。只好降级退回原有的 7.29版本。
用 yum downgrade curl , yum downgrade libcurl 是不行的,提示依赖错误。

[haojc@sn1 src]$ sudo yum downgrade libcurl
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * remi-safe: mirrors.tuna.tsinghua.edu.cn
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package libcurl.x86_64 0:7.29.0-54.el7_7.2 will be a downgrade
---> Package libcurl.x86_64 0:7.69.1-1.1.cf.rhel7 will be erased
--> Finished Dependency Resolution
Error: Package: curl-7.69.1-1.1.cf.rhel7.x86_64 (@city-fan.org)
           Requires: libcurl(x86-64) >= 7.69.1-1.1.cf.rhel7
           Removing: libcurl-7.69.1-1.1.cf.rhel7.x86_64 (@city-fan.org)
               libcurl(x86-64) = 7.69.1-1.1.cf.rhel7
           Downgraded By: libcurl-7.29.0-54.el7_7.2.x86_64 (updates)
               libcurl(x86-64) = 7.29.0-54.el7_7.2
           Available: libcurl-7.29.0-54.el7.x86_64 (base)
               libcurl(x86-64) = 7.29.0-54.el7
           Available: libcurl-7.29.0-54.el7_7.1.x86_64 (updates)
               libcurl(x86-64) = 7.29.0-54.el7_7.1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

可以下载原有版本的curl和libcurl包,用rpm安装:

mkdir curl-rev
cd curl-rev
wget -c http://vault.centos.org/7.3.1611/os/x86_64/Packages/curl-7.29.0-35.el7.centos.x86_64.rpm
wget -c http://vault.centos.org/7.3.1611/os/x86_64/Packages/libcurl-7.29.0-35.el7.centos.x86_64.rpm
wget -c http://vault.centos.org/7.3.1611/os/x86_64/Packages/libcurl-devel-7.29.0-35.el7.centos.x86_64.rpm
rpm -Uvh --oldpackage *.rpm
[haojc@sn1 curl]$ sudo rpm -Uvh --oldpackage *.rpm
[sudo] password for haojc:
Preparing...                          ################################# [100%]
Updating / installing...
   1:libcurl-7.29.0-35.el7.centos     ################################# [ 20%]
   2:curl-7.29.0-35.el7.centos        ################################# [ 40%]
   3:libcurl-devel-7.29.0-35.el7.cento################################# [ 60%]
Cleaning up / removing...
   4:curl-7.69.1-1.1.cf.rhel7         ################################# [ 80%]
   5:libcurl-7.69.1-1.1.cf.rhel7      ################################# [100%]

你可能感兴趣的:(Linux)