无法加载 rggobi.dll,尽管它似乎可用

Can't load rggobi.dll though it appears to be available

提问人:Hack-R 提问时间:5/15/2015 最后编辑:Hack-R 更新时间:12/27/2020 访问量:3607

问:

我正在尝试使用取决于 .clusterflyrggobi

我加载并收到此错误:clusterfly

> pacman::p_load(caret, clusterfly, devtools, geonames, inTrees, mclust, party, 
+                RDSTK, reshape, ROCR, RRF, sqldf, stringi, tree, xlsx)
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll':
  LoadLibrary failure:  The specified path is invalid.

Failed with error:  ‘package ‘rggobi’ could not be loaded’
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/clusterfly_0.4.zip'
Content type 'application/zip' length 64469 bytes (62 KB)
downloaded 62 KB

package ‘clusterfly’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\hackr\AppData\Local\Temp\RtmpopFKT2\downloaded_packages

clusterfly installed
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll':
  LoadLibrary failure:  The specified path is invalid.

Failed with error:  ‘package ‘rggobi’ could not be loaded’
Warning message:
In pacman::p_load(caret, clusterfly, devtools, geonames, inTrees,  :
  Failed to install/load:
clusterfly

这似乎基本上说它不在它应该在的地方。rggobi.dll

因此,我尝试直接安装和加载并收到相同的错误:rgobbi

> install.packages("rggobi")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/rggobi_2.1.20.zip'
Content type 'application/zip' length 422326 bytes (412 KB)
downloaded 412 KB

package ‘rggobi’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\hackr\AppData\Local\Temp\RtmpopFKT2\downloaded_packages
> require(rggobi)
Loading required package: rggobi
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll':
  LoadLibrary failure:  The specified path is invalid.

我觉得这很奇怪,所以我在 Windows 资源管理器中看了一下,文件就在它应该在的位置:rggobi.dll

rggobi.dll

在再次尝试加载它失败后,我的下一个想法是可能存在某种文件权限问题。因此,从文件夹开始,我设置最大权限。rggobichmod 777

我仍然无法加载包,我重复了该过程并尝试为每个连续的文件夹级别直接加载:chmod 777require(gobbi)rggobi.dll

C:\Program Files\R\R-3.2.0\library>chmod 777 rggobi
C:\Program Files\R\R-3.2.0\library>cd rggobi
C:\Program Files\R\R-3.2.0\library\rggobi>ls
DESCRIPTION  LICENSE  Meta       NEWS  data  help  libs
INDEX        MD5      NAMESPACE  R     demo  html
C:\Program Files\R\R-3.2.0\library\rggobi>chmod 777 libs
C:\Program Files\R\R-3.2.0\library\rggobi>cd libs
C:\Program Files\R\R-3.2.0\library\rggobi\libs>chmod 777 x64
C:\Program Files\R\R-3.2.0\library\rggobi\libs>chmod 777 i386
C:\Program Files\R\R-3.2.0\library\rggobi\libs>cd x64
C:\Program Files\R\R-3.2.0\library\rggobi\libs\x64>ls
rggobi.dll  symbols.rds
C:\Program Files\R\R-3.2.0\library\rggobi\libs\x64>chmod 777 rggobi.dll

最后,在 Github 上打开一个问题后,Hadley Wickham 听从了 lawremi,他建议尝试 32 位 R,但这也导致了相同的结果。

如何使此 dll/包可用于 R?

r dll文件

评论

0赞 David Arenburg 5/15/2015
你没有看到一个弹出窗口,询问是否要安装 GTK+ 吗?
0赞 Hack-R 5/15/2015
@DavidArenburg我没有。我在过去一个月内安装了 99%,但我可以/将验证这一点。我有最新版本的 GIMP,我认为我使用过的其他一些 R 包使用 GTK+......现在正在验证... --> 更新:我肯定有最新版本的 GTK+
1赞 David Arenburg 5/15/2015
嗯,这对我来说也失败了。我想知道您是否需要指定像 for package 这样的路径。rjava
0赞 Hack-R 5/15/2015
@DavidArenburg 你是说用?我尝试了几种变体:lib.loc> library(rggobi, lib.loc = "C:\\Program Files\\R\\R-3.2.0\\library", verbose = T, warn.conflicts = T) Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll': LoadLibrary failure: The specified path is invalid. Error: package or namespace load failed for ‘rggobi’
1赞 David Arenburg 5/15/2015
也许会触发 GH 上的问题

答:

3赞 Jak 8/25/2015 #1

我的解决方案是从这里按照以下说明进行操作

如果你还想安装 rggobi,你可以安装 在 R 中,使用以下命令:source("http://www.ggobi.org/downloads/install.r")

0赞 Jacek Kotowski 12/2/2015 #2

为我工作:

我把它粘贴在R中

source("http://www.ggobi.org/downloads/install.r")

然后它问我是否要安装 GTK+,然后安装一个应用程序 ggobi。 然后需要重新启动 R。

如果在系统中未找到安装的两个应用程序,R 将报告它无法加载 rggobi.dll。确保不仅安装软件包,还安装两个应用程序。

评论

1赞 Hack-R 12/3/2015
这就是它在正常工作时所做的。在我写这篇文章的时候,有一个实际的错误,现在已经修复了。