devtools::install_github 错误:无法从 GitHub 安装'unknown package'



使用devtools::install_github安装R包时出现错误

> devtools::install_github('cole-trapnell-lab/leidenbase')
Error: Failed to install 'unknown package' from GitHub:
SSL certificate problem: self signed certificate in certificate chain

我尝试了一个解决方案张贴在这里

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

但仍然得到相同的错误。有什么建议吗?

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
Matrix products: default
BLAS/LAPACK: /mounts/anaconda3/envs/r-4.0.3/lib/libopenblasp-r0.3.12.so
locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
other attached packages:
[1] httr_1.4.2      knitr_1.30      nvimcom_0.9-105
loaded via a namespace (and not attached):
[1] magrittr_2.0.1    usethis_2.0.0     devtools_2.3.2    pkgload_1.1.0     R6_2.5.0
[6] rlang_0.4.10      fansi_0.4.1       tools_4.0.3       pkgbuild_1.2.0    xfun_0.19
[11] sessioninfo_1.1.1 cli_2.2.0         withr_2.3.0       ellipsis_0.3.1    remotes_2.2.0
[16] assertthat_0.2.1  digest_0.6.27     rprojroot_2.0.2   lifecycle_0.2.0   crayon_1.3.4
[21] processx_3.4.5    purrr_0.3.4       callr_3.5.1       fs_1.5.0          ps_1.5.0
[26] curl_4.3          testthat_3.0.1    memoise_1.1.0     glue_1.4.2        compiler_4.0.3
[31] desc_1.2.0        prettyunits_1.1.1

当我运行你的代码时,我没有得到ssl错误,但是你可以尝试使用remotes::install_github()安装leidenbase包:

#install.packages("remotes")
library(remotes)
install_github('cole-trapnell-lab/leidenbase')

也可能值得通过anaconda加载openssl,例如conda install openssl(可能有帮助)。

最新更新