简体   繁体   English

devtools::install_github 错误:无法从 GitHub 安装“未知包”

[英]devtools::install_github Error: Failed to install 'unknown package' from GitHub

I got error from installing R packages using devtools::install_github使用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

I tried a solution posted here我尝试了此处发布的解决方案

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

But still got the same error.但仍然得到同样的错误。 Any suggestions?有什么建议么?

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

I don't get the ssl error when I run your code, but you could try installing the leidenbase package using remotes::install_github() :当我运行您的代码时,我没有收到 ssl 错误,但您可以尝试使用remotes::install_github()安装 leidenbase package :

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

Also it might be worth loading openssl through anaconda, eg conda install openssl (might help).此外,可能值得通过 anaconda 加载 openssl,例如conda install openssl (可能有帮助)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM