Skip to content

cannot load rJava in R

1 message · Lothar Rubusch

#
Hey all!


Thank you for giving me the hint and for your very friendly help, I appreciate!! - True, true reading 
error messages in some case might be helpful.. Here is what I found out:

In brief LD_LIBRARY_PATHS was not set up correctly. It has to be set to the path of the shared 
objects depending on where someone has installed the JDK. I installed it under /usr/local/java/current/ 
so for me that's:
/usr/local/java/current/jre/lib/i386/
/usr/local/java/current/jre/lib/i386/client/

But this was not sufficient, R asked for another rJava.so so I had to add the following path, too (that's where I found the shared object using locate):
/usr/local/lib/R/site-library/rJava/libs/

In conclusion this line did the job:
#export LD_LIBRARY_PATH=/usr/local/java/current/jre/lib/i386/:/usr/local/java/current/jre/lib/i386/client/:/usr/local/lib/R/site-library/rJava/libs/

Now it runs smoothly! Nice!

Best regards,
Lothar



PS:
Some words on the official debian java packages: I can't consider if this still is the state of the art, but I could not find anything that it already has changed. Generally there might be some policy problems with SUN's Java packages and Debian. So the Debian packages (e.g. java-common) afaik are using Blackdown's Java implementations, in Java Version 1.4.2. But with a dummy package it is possible to do a workaround:
http://www.debian.org/doc/manuals/debian-java-faq/ch11.html#s11.2
Thus afaik it is - at least - not always possible to resist only on the official .deb files for Java.