[R] install rJava in Ubuntu 11.10

Arnaud Gaboury arnaud.gaboury at a2ct2.com
Fri Feb 24 20:01:05 CET 2012


As a Linux user, I know you are not running exactly the same Java as on windows. It exists some copyright issues which prevent you to run Sun Java on your Linux box. 
As shown, you are running in fact openJDK. If result is the same for you, being able to run Java, it is not the same for most apps.
Install folders are different, and I guess R cannot find the right place for your Java environment.

Try to google more on this issue (Java on Linux openJDK install folder), or anything about "building Android on Linux"( same problem as Android needs java). There is something you could try: add the openJDK path in your environment.

Hope this help.


Arnaud Gaboury
 
A2CT2 Ltd.


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of John Kane
Sent: vendredi 24 février 2012 19:32
To: r-help at r-project.org
Subject: [R] install rJava in Ubuntu 11.10

I am trying to install rJava on a WUBI  Ubuntu 11.10 installation of R with no luck. I was originally trying to install the iplots package and encountered this rJava problem.

Code used:
install.packages("rJava")

(CRAN mirrors --Canada(ON) and Canada(QC2)

I installed iplots with no problem on Windows 7.

I know just about zero about Ubuntu or Linux in general so I have no idea what I am doing.

Any suggestions would be gratefully received.

I am getting the error/warning messages below.
=================================================

Cannot compile a simple JNI program. See config.log for details.

Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.

ERROR: configuration failed for package ‘rJava’
* removing ‘/home/john/R/i686-pc-linux-gnu-library/2.13/rJava’

The downloaded packages are in
        ‘/tmp/RtmphfnJ62/downloaded_packages’
Warning message:
In install.packages("rJava") :
  installation of package 'rJava' had non-zero exit status =========================================
EXISTING JAVA INSTALLAION

john at ubuntu:~$ java -version
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK Client VM (build 20.0-b11, mixed mode, sharing)

=======================================

I have re-run "R CMD javareconf" as root.

Does the R CMC javareconf need something added?
(i.e. R CMD javaconf xxx)

Do I really need a  Java Development Kit installed?
============================================
sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

____________________________________________________________
Publish your photos in seconds for FREE
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if4

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


More information about the R-help mailing list