前言
-
背景介绍
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)
-
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)
解决方案
-
方案一
# 更新 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