[BioC] Ubuntu Rgraphviz gotcha
Herve Pages
hpages at fhcrc.org
Thu Dec 13 00:09:28 CET 2007
Hi Iain,
IAIN GALLAGHER wrote:
> Hello list,
>
> Using ubuntu 7.04, R 2.6.1 I was unable to load Rgraphviz (despite error free installation / compilation using biocLite). Trying to do so resulted in:
>
>> library(Rgraphviz)
> Loading required package: graph
> Error in dyn.load(file, ...) :
> unable to load shared library '/usr/local/lib/R/site-library/Rgraphviz/libs/Rgraphviz.so':
> libgvc.so.2: cannot open shared object file: No such file or directory
> Error : .onLoad failed in 'loadNamespace' for 'Rgraphviz'
> Error: package/namespace load failed for 'Rgraphviz'
>
> graphviz is installed. In /usr/lib/graphviz there is a link called libgvc.so.2 to libgvc.so.2.0.0
>
> Copying libgvc.so.2.0.0 from /usr/lib/graphviz to /usr/local/libs/R/site-library/Rgraphviz/libs seemed to solve the problem. I can now plot goGraphs!
Sorry to say but this is an ugly hack. At least you could have created a symlink
instead of copying the file. And you could have created this link in /usr/lib and
not in /usr/local/libs/R/site-library/Rgraphviz/libs so you will not have to redo
this the next time you update Rgraphviz. But even like that, this is not the way
things are supposed to be done on Linux.
The problem is that ld-linux.so, the dynamic linker/loader, doesn't find the
libgvc.so.2 library. This is because this library is not in a standard place:
/usr/lib is a standard place but /usr/lib/graphviz is not (ld doesn't search
folders recursively).
So you could either add /usr/lib/graphviz to your LD_LIBRARY_PATH as Li suggested,
which is the traditional and very Unix way of addressing this, or, since you are
on Linux, you could do the following (sudo access required):
1. Create the ld.so.conf file in /etc if it doesn't already exist.
2. Put the following line in it (or add it at the end of the file
if it already exists):
/usr/lib/graphviz
3. Run:
sudo ldconfig
(use the -v option if you are curious, you can run this command as many times
as you wish but one should be enough)
Then everybody on your system should be able to use Rgraphviz (even better, everybody
should be able to use programs that have been linked against graphviz).
Cheers,
H.
>
> Hope this helps anyone else with a similar problem.
>
> cheers
>
> iain
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list