CentOS7升级curl版本报错:Requires: libnghttp2.so.14()(64bit)

前言

  • 背景介绍

    CentOS7执行go build命令编译go程序时,从github.com上拉取依赖失败,而且在CentOS7中发现也无法ping通github网站,查原因说CentOS7默认curl版本较低,需要升级,于是查找升级过程,当然最终还是无法从github.com上拉取依赖,但已成功升级curl版本。

问题描述

  • CentOS7访问github.com报错

    
        Cannot communicate securely with peer: no common encryption algorithm(s). 
        
        (Error code:ssl_error_no_cypher_overlap)
    
    
    
    
    

    Secure Connection Failed

  • CentOS7升级curl报错:Requires: libnghttp2.so.14()(64bit)

    
        Error: Package: libcurl-7.80.0-2.0.cf.rhel7.x86_64 (city-fan.org)
           Requires: libnghttp2.so.14()(64bit)
    
    
    

    yum install curl

解决方案

  • 方案一

    
        # 更新 nss nss-util nss-sysinit nss-tools
        sudo yum update nss nss-util nss-sysinit nss-tools
    
    
  • 方案二

    
        # 安装 libcurl 的 yum 源
        rpm -ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
        
        # 执行yum upgrade更新
        yum upgrade libcurl curl
        
        
        # 然后这里你会发现什么都没有发生要把编辑city-fa源把enabled=0改为enabled=1
        vi /etc/yum.repos.d/city-fan.org.repo
    
        # 再次执行 
        yum update curl --enablerepo=CityFanforCurl -y
    
        ## Error: Package: libcurl-7.65.1-1.0.cf.rhel7.x86_64 (city-fan.org)
        ##    Requires: libnghttp2.so.14()(64bit)
    
        # 解决方法:
        ## 安装 epel 源
        yum install epel-release -y
        
        ## 重新执行上面的安装命令然后依然报错 Requires: libnghttp2.so.14()(64bit)
        
        ## 最终解决方法执行:
    
        yum --enablerepo=epel install libnghttp2 -y && yum install libcurl -y
        
        
        # 再次执行 
        yum update curl --enablerepo=CityFanforCurl -y
    
    

参考链接

  • How to fix curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s)

    https://stackoverflow.com/questions/31107851/how-to-fix-curl-35-cannot-communicate-securely-with-peer-no-common-encryptio

  • Liunx centos7 下 Haxx curl 资源管理错误漏洞(CVE-2021-22901)和Requires: libnghttp2.so.14()

    https://hacker66.me/detail/ZYXWT85.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值