[R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?
R P Herrold
herrold at owlriver.com
Thu Oct 23 08:15:24 CEST 2008
On Wed, 22 Oct 2008, Paulo Cortez wrote:
> This is becoming a nightmare and I am concluding that
> installing java1.6 in CentOS5 is particularly hard,
> specially if you installed previous jdk versions...
If you have multiple versions present, you are going to have
problems as the Sun Java releases do not support
'alternatives' and as a result the end sysadmin has to
correctly configure the Java. Sun published general
instructions on both the .bin and the .rpm versions of its
As Dr. Tru Huynh, a core maintainer in the CentOS project
noted, we publish further a wiki article on the matter, with
two methods (the first close to Sun's approach; the second
designed for users of the 'jpackage' approach)
> I tryed a wide range of solutions. I resume some of them:
> 1) Tryed to reinstall jdk1.6 and use update-alternatives command;
> 1) The CentOS5 howto java guide is outdated and does not work
As author and maintainer of the 'method 1' part of that CentOS
wiki page, and as I build and install R from source RPMs over
to binary RPMs without incident, I am surprised to hear this.
It works here daily and has continuously for the last two or
three years. Please contact me offlist and we can work
through the issues you are having.
> 2) I installed openjdk, from: http://openjdk.java.net/install/
> I checked if the java was updated with:
> $alternatives --config java
It is not clear that 'openjdk' is sufficiently mature -- you
seem to have problems with some self-test in R, which may need
to be filed as a bug with the 'openjdk' project.
> But then I try:
> $ R CMD INSTALL rJava (the rJava.tar.gz was unpacked)
> configure:3880: checking whether JNI programs can be compiled
> configure:3898: gcc -o conftest -O3 -g -std=gnu99 -I$(JAVA_HOME)/../include
> -I$(JAVA_HOME)/../include/linux conftest.c -L$(JAVA_HOME)/lib/i386/server
> ib/i386 -L$(JAVA_HOME)/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib
> -L/usr/lib -ljvm >&5
> /usr/bin/ld: cannot find -ljvm
As I do not use 'openjdk', the solution may be as simple as a
symling of the desired 'libjdk' into the library search path.
> All these attempts took 2 hours of my life, with no results :(((
Goodness --- I have probably spent four times that in
experimentation and maintaining just aprt of that wiki page.
-- Russ herrold
herrold at centos.org
More information about the R-help