Rgraphviz库加载错误

时间:2012-04-25 10:59:10

标签: r

我对Rgraphviz有疑问。正确安装GraphvizRgraphviz后,我无法加载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.15/Resources/library/Rgraphviz/libs/x86_64/Rgraphviz.so':

dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rgraphviz/libs/x86_64
  /Rgraphviz.so, 6): Library not loaded: /usr/local/lib/libgvc.5.dylib

  Referenced from:         
/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rgraphviz/libs/x86_64/Rgraph  viz.so

 Reason: image not found

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

 http://bioconductor.org/packages/release/bioc/html/Rgraphviz.html

Ask further questions on the Bioconductor mailing list

http://bioconductor.org/docs/mailList.html

1 个答案:

答案 0 :(得分:2)

您需要检查Graphviz是否安装在R正在寻找的路径上。如果不是,你应该

$ export LD_LIBRARY_PATH = path_to_graphviz

在致电R之前。或者将此行添加到您的bash个人资料中,然后自动运行。