help updating package rJava (on ubuntu)
Simon, Thanks for yout fast response. Thing is - i managed to get Version 0.9-1 installed and fully functional. And $ locate jdk returns too many entries to post here, so i'm pretty sure its on the machine. So i'd like to know how i can ensure it's "registered in R". This i have no idea how to do. I simply don't have enough R and linux experience. Also the thread i mentioned http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing seems to be about pointing R at the right location of certain aspects of Java. But lacks enough explicit details for myself to be able use. Thanks again, also for any further suggestions, Karl
On 02/18/2012 07:45 PM, Simon Urbanek wrote:
On Feb 18, 2012, at 10:44 AM, Karl Brand wrote:
Esteemed useRs and Devs, Attempts to update package:rJava to the latest version have failed. See my code and output below. Notably, as suggested here http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing $ sudo apt-get install r-cran-rjava ran successfully without error or warning, but my rJava package is not updated, and remains un-updatable... Greatly appreciate any suggestions getting my rJava updated, Karl
update.packages(lib.loc = "/usr/lib/R/site-library")
--- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done rJava : Version 0.9-1 installed in /usr/lib/R/site-library Version 0.9-3 available at http://cran.xl-mirror.nl Update (y/N/c)? y <snip> checking Java support in R... present: interpreter : '/usr/bin/java' archiver : '' compiler : '' header prep.: '' cpp flags : '' java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm' configure: error: Java Development Kit (JDK) is missing or not registered in R Make sure R is configured with full Java support (including JDK). Run R CMD javareconf as root to add Java support to R. ...so i do as suggested: $ sudo R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_23 Java home path : /usr/lib/jvm/java-6-openjdk/jre Java compiler : not present Java headers gen.: Java archive tool: Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm JNI cpp flags : Updating Java configuration in /etc/R Done. But i still get the same error when trying to update rJava!
Obviously - your'e lacking JDK on your machine - see the output above (you have only JRE, not JDK). If you want to compile rJava form sources you need to install JDK first, then add Java support to R (via javareconf) and then build rJava. Cheers, Simon
sessionInfo()
R version 2.14.1 (2011-12-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_AU.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_AU.UTF-8 [7] LC_PAPER=C 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 -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3455 |F +31 (0)10 704 4743 |M +31 (0)642 777 268
______________________________________________ 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.
Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3455 |F +31 (0)10 704 4743 |M +31 (0)642 777 268