[R] littler and rJava

Dirk Eddelbuettel edd at debian.org
Mon Aug 27 15:50:21 CEST 2012


John,

I see this:

edd at max:~$ r -e'require(rJava)'
Loading required package: rJava
Loading required package: methods
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/usr/lib/R/site-library/rJava/libs/rJava.so':
  libjvm.so: cannot open shared object file: No such file or directory

but also

edd at max:~$ locate libjvm.so
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/cacao/libjvm.so
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so
edd at max:~$ LD_LIBRARY_PATH="/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server" r -e'require(rJava)'
Loading required package: rJava
Loading required package: methods
edd at max:~$ 

Java is a bit of a moving target. We did add 

edd at max:~/svn/littler$ ./configure --help|grep java
  --with-java-libs        Link littler to R's java libraries
edd at max:~/svn/littler$ 

a while back but that may not be sufficient.  Would you have time to poke
around at your end how we could make this better (presuming that you want
something more solid than the LD_LIBRARY_PATH adjustment you could also do on
your system-side).

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com




More information about the R-help mailing list