quantmod - SSL: unable to get local issuer certificate in R

流过昼夜 提交于 2019-12-03 21:56:11

The problem is because cURL is using OpenSSL by default. It can be fixed to use winSSL by installing a special version of cURL by,

Sys.setenv(LIBCURL_BUILD="winssl")
install.packages("https://github.com/jeroen/curl/archive/master.tar.gz", repos = NULL)

Please refer to this link:

https://github.com/jeroen/curl/issues/122

The error is often caused by an outdated or missing bundle of CA root certificates, but can also occur when the remote server is using a self-signed certificate. In either case cURL cannot verify the remote server's certificate and throws an error.

You can disable the requirement to verify certificates by using:

library(httr)
httr::set_config(config(ssl_verifypeer = FALSE))

However this is not recommended as it creates security vulnerabilities.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!