1. OpenSSL: error:100AE081

这个问题其实是我在 CentOS 6.5 中安装 “packagefinder” R 包的时候遇到的一个问题(其实 wget 下载 https 资源的时候也出现了这个问题)。

  1. > install.packages("packagefinder")
  2. --- Please select a CRAN mirror for use in this session ---
  3. Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file '/RiboBio/Bioinfo/Pipeline/SoftWare/R/R-4.0.3/lib64/R/doc/CRAN_mirrors.csv'
  4. trying URL 'https://mirrors.ustc.edu.cn/CRAN/src/contrib/packagefinder_0.3.2.tar.gz'
  5. Content type 'application/octet-stream' length 433718 bytes (423 KB)
  6. ==================================================
  7. downloaded 423 KB
  8. * installing *source* package packagefinder ...
  9. ** package packagefinder successfully unpacked and MD5 sums checked
  10. ** using staged installation
  11. ** R
  12. ** inst
  13. ** byte-compile and prepare package for lazy loading
  14. ** help
  15. *** installing help indices
  16. *** copying figures
  17. ** building package indices
  18. ** testing if installed package can be loaded from temporary location
  19. Warning in url(sprintf("%s/%s", cran, path), open = "rb") :
  20. URL 'https://CRAN.R-project.org/web/packages/packages.rds': status was 'SSL connect error'
  21. Error: package or namespace load failed for packagefinder’:
  22. .onAttach failed in attachNamespace() for 'packagefinder', details:
  23. call: url(sprintf("%s/%s", cran, path), open = "rb")
  24. error: cannot open the connection to 'https://CRAN.R-project.org/web/packages/packages.rds'
  25. Error: loading failed
  26. Execution halted
  27. ERROR: loading failed
  28. * removing ‘/Bioinfo/SoftWare/R/R-4.0.3/lib64/R/library/packagefinder
  29. The downloaded source packages are in
  30. ‘/tmp/RtmpTjsgn2/downloaded_packages
  31. Updating HTML index of packages in '.Library'
  32. Making 'packages.html' ... done
  33. Warning messages:
  34. 1: In download.file(url, destfile = f, quiet = TRUE) :
  35. URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'SSL connect error'
  36. 2: In install.packages("packagefinder") :
  37. installation of package packagefinder had non-zero exit status
  38. >
  1. [root@log01 ~]# wget https://cran.r-project.org/src/contrib/packagefinder_0.3.2.tar.gz --no-check-certificate
  2. --2021-02-20 11:50:14-- https://cran.r-project.org/src/contrib/packagefinder_0.3.2.tar.gz
  3. Resolving cran.r-project.org... 137.208.57.37
  4. Connecting to cran.r-project.org|137.208.57.37|:443... connected.
  5. OpenSSL: error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group
  6. OpenSSL: error:1408D010:SSL routines:SSL3_GET_KEY_EXCHANGE:EC lib
  7. Unable to establish SSL connection.

拿着这个问题,谷歌了一下,发现有些人说需要升级 wget(configure 的时候增加一个 —with-ssl=openssl 选项),个人尝试了一下,其实解决不了问题。

个人比较信服的一个解析:

参考 https://www.centos.org/forums/viewtopic.php?f=14&t=43803 这个连接的解释,说这是 CentOS 6.5 的一个bug,不过已经修复了。如果是使用在线的 yum 源的话,应该是不会出现这个问题的。不过我使用的是本地源,所以就出现了这个问题,这个应该是版本兼容性不行导致的。

由于 CentOS 6.5 自带的 OpenSSL 最高版本是 openssl-1.0.1e-15.el6.x86_64,因此我们可以通过升级 openssl 到 openssl-1.0.1e-16 及以上,比如:openssl-1.0.1e-16.el6_5.x86_64.rpm,或者 openssl-1.0.1e-57.el6.x86_64.rpm。

由于 CentOS 已经含有 openssl-1.0.1e-15.el6_5.x86_64 这个软件,所以需要使用命令:

  1. rpm -ivh --replacefiles openssl-*.rpm

:::tips 温馨提示:

谷歌搜索 openssl-1.0.1e-16 及以上的 rpm 时,在 https://centos.pkgs.org/6/centos-x86_64/ 中找到的 rpm 下载包下载链接基本都会指向 404 错误,无法下载!!!

最后在 http://ftp.iij.ad.jp/pub/linux/centos-vault/6.8/cr/x86_64/Packages/ 才找到 openssl-1.0.1e-57.el6.x86_64.rpm 的一个可用下载链接。 :::

最终解决方法:

  1. [root@log01 pkgs]# wget http://ftp.iij.ad.jp/pub/linux/centos-vault/6.8/cr/x86_64/Packages/openssl-1.0.1e-57.el6.x86_64.rpm
  2. [root@log01 pkgs]# rpm -ivh --replacefiles openssl-1.0.1e-57.el6.x86_64.rpm
  3. warning: openssl-1.0.1e-57.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
  4. Preparing... ########################################### [100%]
  5. 1:openssl ########################################### [100%]
  6. [root@log01 pkgs]# rpm -qa|grep openssl
  7. openssl-1.0.1e-15.el6.x86_64
  8. openssl-1.0.1e-57.el6.x86_64
  9. openssl-devel-1.0.1e-15.el6.x86_64

安装完成后,通过 wget 再次下载 https 资源,重新安装 “packagefinder” R 包都显示一切正常!