我在企业代理后面的Windows机器上运行R.当运行curl包的R 3.3.2和2.3版时,这可以工作:
curl::curl_fetch_memory("https://google.com")
另请注意以下事项:
> curl::curl_options(filter = "sslcert")
sslcert sslcerttype
10025 10086
但是,运行R 3.4.1和curl 2.8时会发生这种情况:
> curl::curl_fetch_memory("https://google.com")
Error in curl::curl_fetch_memory("https://google.com") :
error setting certificate verify locations:
CAfile: /mingw32/ssl/certs/ca-bundle.crt
CApath: none
注意:
> curl::curl_options(filter = "sslcert")
proxy_sslcert proxy_sslcerttype sslcert sslcerttype
10254 10255 10025 10086
我从curl源代码中收集到这两个版本之间添加了这两个新选项。
由于这是我能找到的唯一相关差异,我的预感是curl正在寻找错误路径中的proxy_sslcert。但我无法弄清楚如何改变这个变量,也不知道我应该如何改变它。另外,显示的数字是什么(10254等)?
我实际上并不需要专门使用curl
,但很多其他软件包依赖它,例如。
> httr::GET("https://google.com")
Error in curl::curl_fetch_memory(url, handle = handle) :
error setting certificate verify locations:
CAfile: /mingw32/ssl/certs/ca-bundle.crt
CApath: none