[R] install the SJava package on unix

Duncan Temple Lang duncan at research.bell-labs.com
Mon Aug 19 15:13:35 CEST 2002


Hi Xavier.

  The error message suggests that in loading SJava.so, the loader
cannot find the core Java library libjvm.so which is provided by in
your Java installation (JDK). Usually this is not installed somewhere
standard on your system and so, as you correctly surmized, you must
explicitly have the directory in your LD_LIBRARY_PATH. The scripts
RJava.bsh or RJava.csh that are installed with the SJava package in
the in the scripts/ directory of the package attempt to get the
correct values and will work for most JDKs. So before starting R,
execute

  . <wherever>/SJava/scripts/RJava.bsh
or for csh and tcsh shells
  source <wherever>/SJava/scripts/RJava.csh

and that will hopefully fix the proble.  Otherwise, find where
libjvm.so (and other libraries on which it depends (e.g. libhpi.so))
and manually add those directories to LD_LIBRARY_PATH.

 Hope this works.
  D.

Xavier.Abulker at fimat.com wrote:
> 
> Hi,
> I've got a problem to use the SJava package with R.
> 
> I have a SUN solaris 8 machine.
> 
> Then I did R INSTALL -c SJava_0.65-0.tar.gz
>  without problem
> 
> Now I try the test provided on the web site:
> library(SJava)
> and here I receive the error message:
> 
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>         unable to load shared library
> "/usr/local/lib/R/library/SJava/libs/SJava.so":
>   ld.so.1: /usr/local/lib/R/bin/R.bin: fatal: libjvm.so: open failed: No
> such file or directo
> ry
> Error in library(SJava) : .First.lib failed
> 
> 
> The result of the command
> java -version
> java version "1.2.2"
> Solaris VM (build Solaris_JDK_1.2.2_08, native threads, sunwjit)
> 
> The LD_LIBRARY_PATH is
> 
> Sys.getenv("LD_LIBRAYRY_PATH")
> LD_LIBRARY_PATH
> "/usr/local/lib/R/bin:/usr/local/lib:/usr/local/lib:/usr/ccs/lib:/usr/lib:/usr/local/lib:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3:/usr/ccs/bin:/usr/openwin/lib:/usr/local/lib/R/library/SJava/libs:/usr/lib:/usr/local/lib/R/bin:/usr/local/lib/R/library/SJava/org/omegahat/Jars/:/opt/CARMA/lib:"
> 
> 
> 
> Could you please help me?
> 
> Thanks
> 
> Xavier
> 
> 
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
_______________________________________________________________

Duncan Temple Lang                duncan at research.bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-3217
700 Mountain Avenue, Room 2C-259  fax:    (908)582-3340
Murray Hill, NJ  07974-2070       
         http://cm.bell-labs.com/stat/duncan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list