[R] SJava
Yasser El-Zein
abu3ammar at gmail.com
Thu Nov 18 20:40:00 CET 2004
Thank you Prof Ripley for your guidance. I re-installed gpp and SJava
installed correctly.
I am now running into this problem: When I load the SJava library I get:
> library(SJava)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"/usr/local/lib/R/site-library/SJava/libs/SJava.so":
libRSNativeJava.so: cannot open shared object file: No such file or directory
Error in library(SJava) : .First.lib failed for 'SJava'
The file does exit:
$ ls -la /usr/local/lib/R/site-library/SJava/libs/SJava.so
-rwxr-xr-x 1 root staff 283388 Nov 18 13:27
/usr/local/lib/R/site-library/SJava/libs/SJava.so
I then ran:
$ R CMD ldd /usr/local/lib/R/site-library/SJava/libs/SJava.so
libRSNativeJava.so => not found
libjvm.so => not found
libR.so => /usr/lib/R/lib/libR.so (0x40014000)
libc.so.6 => /lib/tls/libc.so.6 (0x401df000)
libblas.so.3 => /usr/lib/atlas/libblas.so.3 (0x4031a000)
libg2c.so.0 => /usr/lib/libg2c.so.0 (0x40663000)
libm.so.6 => /lib/tls/libm.so.6 (0x40681000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x406a5000)
libpcre.so.3 => /usr/lib/libpcre.so.3 (0x406ae000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x406be000)
libz.so.1 => /usr/lib/libz.so.1 (0x406ce000)
libreadline.so.4 => /lib/libreadline.so.4 (0x406df000)
libdl.so.2 => /lib/tls/libdl.so.2 (0x4070b000)
libncurses.so.5 => /lib/libncurses.so.5 (0x4070f000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
libjvm.so does exist in 4 locations in my intel box running debian:
/opt/splus/java/jre/lib/i386/client/libjvm.so
/opt/splus/java/jre/lib/i386/server/libjvm.so
/opt/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so
/opt/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so
I have JAVA_HOME defined as:
$ echo $JAVA_HOME
/opt/j2sdk1.4.2_06/
Your further help is greatly appreciated.
On Thu, 18 Nov 2004 19:27:53 +0000 (GMT), Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> Seem pretty straightforward to me: either gpp is not a C++ compiler or it
> does not work (possibly because LD_LIBRARY_PATH does not contain its
> run-time libraries).
>
>
>
> On Thu, 18 Nov 2004, Yasser El-Zein wrote:
>
> > I failed to build SJava dure to teh error below. Any ideas?
> >
> > # R CMD INSTALL -c SJava_0.68-0.tar.gz
> > * Installing *source* package 'SJava' ...
> > checking for java... /opt/j2sdk1.4.2_06//bin/java
> > Java VM /opt/j2sdk1.4.2_06//bin/java
> > checking for javah... /opt/j2sdk1.4.2_06//bin/javah
> > Looking in /opt/j2sdk1.4.2_06/include
> > Looking in /opt/j2sdk1.4.2_06/include/linux
> > checking for g++... no
> > checking for c++... no
> > checking for gpp... gpp
> > checking for C++ compiler default output... b.out
> > checking whether the C++ compiler works... configure: error: cannot
> > run C++ compiled programs.
>
> --
> Brian D. Ripley, ripley at stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
>
More information about the R-help
mailing list