简体   繁体   English

无法加载R中的任何程序包(无法加载共享对象)

[英]Unable to load any package in R (unable to load shared object)

I have been using R for the last 2 years. 最近两年来我一直在使用R。 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): 这是在我需要()/库()一个包装(例如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. 非常感激。

As BondedDust has explained in the comments, the problem has to do with the permissions that are given to users. 正如BondedDust在评论中解释的那样,该问题与授予用户的权限有关。 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. 将库更改为本地库所需要遵循的过程非常简单,在关于stackoverflow的此问题的第二个答案中提到了该过程。

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

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