问题描述
过去 2 年我一直在使用 R.我昨天试图启动该程序以运行我的脚本之一,而我正在使用的包未能加载.我不确定发生了什么,因为它之前工作正常.我尝试卸载并重新安装该软件,但没有任何帮助.这是我在 require()/library() 包(例如 ggplot2)时遇到的错误:
I have been using R for the last 2 years. I tried to start the program yesterday to run one of my scripts and the packages that I am using failed to load. I am not sure what happened as it was working fine earlier. I tried to uninstall and re-install the software but it wasn't of any help. Here's the error I get when I require()/library() a package (for example ggplot2):
>require(ggplot2)
Loading required package: ggplot2
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object '//mypath/myuser/data/Documents/R/win-library/3.2/digest/libs/x64/digest.dll':
LoadLibrary failure: Access is denied.
>library(ggplot2)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object '//mypath/myuser/data/Documents/R/win-library/3.2/digest/libs/x64/digest.dll':
LoadLibrary failure: Access is denied.
我发现很多人在不同的网站上问同样的问题,但他们的主要问题是特定的包.我对所有包裹都遇到了这个问题.有什么想法可以解决这个问题吗?非常感谢.
I have found many people asking the same question on different websites, but their main problem was with a specific package. I am having this trouble with all packages. Any ideas how I can solve this problem? Much appreciated.
推荐答案
正如 BondedDust 在评论中所解释的,问题与授予用户的权限有关.我连接到一个网络,其中库保存在共享空间中.该问题已通过将默认库移动到本地路径解决.将库更改为本地库所需遵循的过程非常简单,在 this question on stackoverflow.
As BondedDust has explained in the comments, the problem has to do with the permissions that are given to users. I am connected to a network where the libraries are saved on a shared space. The issue was resolved by moving the default library to a local path. The process that needs to be followed to change the library to a local one is quite simple and it is mentioned in the second answer in this question on stackoverflow.