Sonntag, 16. März 2008

[BioC] Rgraphviz problem - moaning cannot find some .so file

[BioC] Rgraphviz problem

In R/Bioconductor, many packages including ppiData depend on the package "Rgraphviz". By default the Rgraphviz can be installed without any warning and it only moans when you want to load it via the command "library", most of the cases you will see some warnings like follows (simplified)

unable to load shared library Rgraphviz.so
cannot find file: libgvc.so.2

The problem comes from the fact that the graphviz libraries are not in the path that ld searches. If you are not the root of the system, the most easy and sound trick to solve this problem is to edit (or create) your ~/.bashrc file, adding the following line:

## to enable Rgraphviz package in R
export LD_LIBRARY_PATH = /usr/lib/graphviz

(Don't forget to change the directory to the one on your system)