首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >renv:restore()总是在windows中失败

renv:restore()总是在windows中失败
EN

Stack Overflow用户
提问于 2021-04-23 10:13:05
回答 1查看 390关注 0票数 1

每当我想使用renv:restore()在我的windows机器上重新创建一个项目时,它总是无法安装软件包。我总是收到相同的错误(尽管包可能会改变):

代码语言:javascript
复制
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/xfun/xfun_0.21.tar.gz' ...
Error: failed to retrieve package 'xfun'
In addition: Warning messages:
1: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
2: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
3: download failed [error code 35] 
4: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
5: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 

这是我的会话信息:

代码语言:javascript
复制
> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.5 tools_4.0.5    renv_0.12.0   

这也可能是有用的:

代码语言:javascript
复制
> getOption("download.file.method")
[1] "wininet"
> renv:::renv_download_file_method()
[1] "curl"
>

在运行:Sys.setenv(RENV_DOWNLOAD_METHOD = "curl") (或wininetlibcurl)之后,我总是得到与以前相同的错误。

作为一种解决办法,我做了以下工作:

project

  • Install

  • 以正常方式关闭包(不使用重命名)
  1. 使用renv
  2. 还原快照

打开项目

如果以前已经安装了这些软件包,那么它们将是符号链接的,并且能够工作。

不幸的是,这非常麻烦,因为许多软件包都有依赖项,我必须手动安装它们,这正是我想要避免的事情之一,也是使用renv的原因之一!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-04-26 09:18:12

为了编写文档:在遵循了https://github.com/rstudio/renv/issues/735#issuecomment-825778542来自Kevin Ushey的回答之后,我设法使它工作起来:

Sys.setenv(RENV_DOWNLOAD_METHOD = "wininet")

  • Run renv::restore()

  1. 更新renv到最新版本(当前为0.13.2)
  2. 运行
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67228070

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档