繁体   English   中英

无法在Mac OS X Lion上安装R软件包“Rgraphviz”

[英]Not able to Install R package “Rgraphviz” on Mac OS X Lion

我花了很多时间试图解决这个问题,但仍然没有运气。 我试图让Rgraphviz在Max OS X Lion上使用R 2.14.1

这些是我在Mac OS X Lion上安装和使用Rgraphviz所采取的步骤:

  1. 通过以下方式安装graphviz: sudo port install graphviz

  2. 检查安装是否成功: pkg-config --modversion libgvc

结果: 2.28.0 < - 这意味着它没问题

根据R 2.14.1

source("http://www.bioconductor.org/biocLite.R") biocLite("Rgraphviz")

每当我尝试使用该库时,我都会收到以下错误

Error : .onLoad failed in loadNamespace() for 'Rgraphviz', details:
call: value[[3L]](cond)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rgraphviz/libs/i386/Rgraphviz.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rgraphviz/libs/i386/Rgraphviz.so, 6): Library not loaded: /usr/local/lib/libgvc.5.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rgraphviz/libs/i386/Rgraphviz.so

Check that (1) graphviz is installed on your system; (2) the installed version of
graphviz matches '2.26.3'; this is the version used to build this Rgraphviz
package; (3) graphviz is accessible to R, e.g., the path to the graphviz 'bin'
directory is in the system 'PATH' variable.  See additional instructions in the
'README' file of the Rgraphviz 'source' distribution, available at

我注意到的一些事情

  • 在“帮助”文件中建议的graphviz是2.26.3,Mac Ports安装的graphviz是2.28.0,但由于它是一个较新的版本,我认为这没有什么区别,而且我找不到v 2.26 0.3
  • 建议编号(3)似乎是关键,但我找不到/没有graphbiz下的bin目录

此外,当我运行一个locate Rgraphviz.so没有结果。

任何解决方案的线索将非常感谢,非常感谢!

还有一个失败点。 如果您使用Fink来安装graphviz,即使您使用configure参数指向graphviz,您仍然可能会像我一样遇到单独的构建错误,现在看起来像:

R CMD INSTALL --configure-args='--with-graphviz=/sw' Rgraphviz_1.34.0.tar.gz 

在LL_funcs.c的构建错误期间安装将失败,因为它正在查找不安装的库,除非您还安装了graphviz-dev。 你会看到这个:

In file included from LL_funcs.c:1:
common.h:31:17: error: gvc.h: No such file or directory
common.h:32:22: error: gvplugin.h: No such file or directory
common.h:35:20: error: gvcext.h: No such file or directory
common.h:39:20: error: gvcjob.h: No such file or directory

当然还有更多的构建错误。 一定要确定

fink install graphviz-dev

谢谢你的最终答案,安装似乎对我有用! (我仍然需要检查包是否正常运行)。 快速观察一下:Graphviz安装在我的机器上的/ usr / local中,因此必须按如下方式输入上述命令:

sudo R CMD INSTALL --configure-args='--with-graphviz=/usr/local' Rgraphviz_1.32.0.tar.gz

暂无
暂无

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

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