【问题标题】:R - install_github failsR - install_github 失败
【发布时间】:2015-09-26 09:39:25
【问题描述】:

我正在尝试在 R 中从 github 安装一个包,但是我收到以下错误:

> install_github("jmp75/rClr", build_vignettes=TRUE)
Downloading github repo jmp75/rClr@master
Error in curl::curl_fetch_memory(url, handle = handle) : 
Peer certificate cannot be authenticated with given CA certificates

我已将 RCurl 选项设置为:

options(RCurlOptions = c(getOption("RCurlOptions"),   ssl.verifypeer = FALSE,  ssl.verifyhost = FALSE ) )

检查设置后:

getOption("RCurlOptions")

我们看到了....

$cainfo
[1] "C:/_CODE/R/Library/RCurl/etc/ca-bundle.crt"

$ssl.verifypeer
[1] FALSE

$ssl.verifyhost
[1] FALSE

我仍然收到错误:

Downloading github repo jmp75/rClr@master
Error in curl::curl_fetch_memory(url, handle = handle) : 
Peer certificate cannot be authenticated with given CA certificates

任何线索

【问题讨论】:

    标签: r github rcurl


    【解决方案1】:

    这行得通吗?我最近不得不将这段代码从ssl.verifypeer 更改为ssl_verifypeer

    library(httr)
    set_config(config(ssl_verifypeer = 0L))
    

    看这里devtools::install_github() - Ignore SSL cert verification failure

    【讨论】:

    • 我认为不需要library(RCurl) 行?对于经常遇到这个问题的其他人:我在我的 .Rprofile 文件中添加了一行:.fixdevtools <- function() { httr::set_config( httr::config( ssl_verifypeer = 0L ) ) } 现在我只需要每次都输入.fixdevtools(),而不是回到谷歌并找到这个答案:)
    猜你喜欢
    • 2019-07-01
    • 1970-01-01
    • 2021-04-01
    • 2015-10-17
    • 2014-09-07
    • 2021-04-09
    • 2017-02-01
    • 2016-02-17
    • 1970-01-01
    相关资源
    最近更新 更多