我花了很多时间试图解决这个问题,但仍然没有运气。我想让Rgraphviz在Max OS X Lion上使用R 2.14.1
这些是我在Mac OS X Lion上安装和使用Rgraphviz所采取的步骤:
通过以下方式安装graphviz:sudo port install graphviz
检查安装是否成功: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
我注意到的一些事情
同样,当我运行locate Rgraphviz.so
时,没有结果。
非常感谢任何有关解决方案的线索, 非常感谢!
答案 0 :(得分:1)
感谢最终答案,安装似乎对我有用! (我仍然需要检查包是否正常运行)。快速观察一下:Graphviz安装在我的机器上的/ usr / local中,因此必须按如下方式输入上述命令:
sudo R CMD INSTALL --configure-args='--with-graphviz=/usr/local' Rgraphviz_1.32.0.tar.gz
答案 1 :(得分:1)
还有一个失败点。如果您使用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