【问题标题】:Bitdefender Error: Warning in install.packages: lib = is not writableBitdefender 错误:install.packages 中的警告:lib = 不可写
【发布时间】:2019-09-24 09:19:16
【问题描述】:

我不小心取消了我的图书馆的链接。

unlink(C:/Users/.../R/win-library/3.6")

所以我重新安装了 R 和 R Studio。自此,我有很多麻烦。如果我想安装一个包,例如

install.packages("haven") 

install.packages("haven", dependencies = TRUE)

我收到这条消息:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

Error in install.packages : cannot open file 'C:/Users/.../R/win-library/3.6/file2d6465c81796/backports/DESCRIPTION': Permission denied

我过去曾多次安装并重新安装 R,但从未遇到过这些问题。所以肯定和我之前做的unlink操作有关。此外,如果我想安装一个包,R 会安装大量的附加包(例如haven)。

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/.../R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘backports’, ‘digest’, ‘glue’, ‘zeallot’, ‘assertthat’, ‘utf8’, ‘ellipsis’, ‘magrittr’, ‘rlang’, ‘pkgconfig’, ‘vctrs’, ‘R6’, ‘clipr’, ‘crayon’, ‘BH’, ‘cli’, ‘fansi’, ‘pillar’, ‘forcats’, ‘hms’, ‘Rcpp’, ‘readr’, ‘tibble’


sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

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

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1  

【问题讨论】:

  • 您是否尝试按照错误消息的建议重新安装 Rtools?
  • “权限被拒绝”的解决方法是使用sudo R 从终端启动 R,然后安装您的软件包。您可以返回 Rstudio 使用该软件包。丑陋但对我有用。
  • @Chelmy88:不,如果我安装 RTools,没有任何变化。
  • @ haci:是的,我在这里读到了这个修复:stackoverflow.com/questions/32540919/library-is-not-writable。但是,我以前从未遇到过这个问题。所以肯定发生了一些变化。

标签: r rstudio


【解决方案1】:

Bitdefender 是我上次安装 R 和 R studio 后安装的原因。您必须更改安全性 (Schutz) --> 安全文件 (Sichere Dateien) --> 应用程序访问 (Anwendungszugriff) 中的设置并启用 R 和 RStudio(如果 Bitdefender 中的英语含义不同,请编辑此设置,因为我有德语版本)。

【讨论】:

    猜你喜欢
    • 2013-10-28
    • 1970-01-01
    • 2018-03-17
    • 1970-01-01
    • 2014-09-08
    • 2018-12-27
    • 1970-01-01
    • 2014-06-14
    • 2017-09-21
    相关资源
    最近更新 更多