简体   繁体   English

安装 R 包时出错:权限被拒绝 [R]

[英]Error installing R packages: permission denied [R]

I recently updated both R (4.0.2) and RStudio (1.3.1073) installations on my computer (Windows 8.1 64bit).我最近在我的计算机(Windows 8.1 64 位)上更新了 R (4.0.2) 和 RStudio (1.3.1073) 安装。

Then, I ran some old code and get a problem when loading the RecordLinkage package:然后,我运行了一些旧代码并在加载RecordLinkage package 时遇到问题:

package 'ffbase' could not be loaded无法加载 package 'ffbase'

I saw that the RecordLinkage package depends on ffbase and ff package.我看到RecordLinkage package 依赖于ffbaseff package。 The former is ok, but when try to (re)install ff I get a message that some file could not be opened.前者没问题,但是当尝试(重新)安装ff时,我收到一条消息,提示无法打开某些文件。

Error in install.packages: não foi possível abrir o arquivo 'C:/Users/vinicius.lima/Documents/R/win-library/4.0/file1e88630e7640/ff/doc/ANNOUNCEMENT-2.0.txt': Permission denied install.packages 中的错误:não foi possível abrir o arquivo 'C:/Users/vinicius.lima/Documents/R/win-library/4.0/file1e88630e7640/ff/doc/ANNOUNCEMENT-2.0.txt':权限被拒绝

The same type of message is given when I try to reinstall some packages like RecordLinkage itself and tidyverse , for example.例如,当我尝试重新安装诸如RecordLinkage本身和tidyverse类的软件包时,会给出相同类型的消息。

I do not have trouble installing the package ISLR , for example.例如,我安装 package ISLR没有问题。

There are plenty of suggestions in other similar questions like:在其他类似问题中有很多建议,例如:

  • Checking admin permission检查管理员权限
  • Checking/changing the content of `.libPaths()´ function检查/更改 `.libPaths()´ function 的内容
  • Changing to a machine user installation instead of an admin one ( description here )更改为机器用户安装而不是管理员安装(此处描述

None of these options worked for me.这些选项都不适合我。

I actually don't know if the recent update has anything to do with this, but it was the only significant change made in the last three weeks.我实际上不知道最近的更新是否与此有关,但这是过去三周内唯一的重大变化。 Everything worked pretty fine before this.在此之前一切都很好。

I really appreciate if anybody can help with this.如果有人能提供帮助,我真的很感激。

Vinicius维尼修斯

[Was having the same problem, could not figure it out for the life of me. [遇到同样的问题,我这辈子都想不通。 I'm answering here also to hear about a better solution, whenever it appears.我在这里回答也是为了听到更好的解决方案,无论何时出现。 Seems to be an issue with package versions (my problems were with ff , ffbase and bit , btw)]似乎是 package 版本的问题(我的问题是ffffbasebit ,顺便说一句)]

What I did as a workaround (as people with tight deadlines often do) to get back running with RecordLinkage work was install the following versions of packages:为了让RecordLinkage工作重新运行,我作为一种变通方法(就像时间紧迫的人经常做的那样)所做的是安装以下版本的软件包:

bit : 1.1-14 bit :1.1-14
ff : 2.2-14 ff : 2.2-14
ffbase : 0.12.7 ffbase :0.12.7
RecordLinkage : 0.4-11记录链接: RecordLinkage

got me back to work, hope it helps you out, too.让我回去工作,希望它也能帮助你。

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

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