0

What i am looking for is R-java rpm package but i dont see it here for https://dl.fedoraproject.org/pub/epel/5/x86_64/repoview/letter_r.group.html as mentioned at https://cran.r-project.org/bin/linux/redhat/README

As mentioned at https://cran.r-project.org/bin/linux/redhat/README that R-java rpm is required to ensure that R is configured for use with Java.

Does that mean absence of that for RHEL5 i will not be able to use R with java on my RHEL5 server ?

Invictus
  • 4,028
  • 10
  • 50
  • 80

1 Answers1

1

If you can't find the R-java RPM package for RHEL5 anywhere, MAYBE you can configure Java for R manually. On CentOS7, you can see below that R-java contains no files and only configures R for Java:

# rpm -qp --list R-java-3.2.3-1.el7.x86_64.rpm
(contains no files)

# rpm -qp --requires R-java-3.2.3-1.el7.x86_64.rpm 
R-core = 3.2.3-1.el7
java-headless
/bin/sh
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsXz) <= 5.2-1

# rpm -qp --scripts R-java-3.2.3-1.el7.x86_64.rpm
postinstall scriptlet (using /bin/sh):
R CMD javareconf \
    JAVA_HOME=/usr/lib/jvm/jre \
    JAVA_CPPFLAGS='-I/usr/lib/jvm/java/include\ -I/usr/lib/jvm/java/include/linux' \
    JAVA_LIBS='-L/usr/lib/jvm/jre/lib/amd64/server \
    -L/usr/lib/jvm/jre/lib/amd64\ -L/usr/lib/jvm/java/lib/amd64 \
    -L/usr/java/packages/lib/amd64\ -L/lib\ -L/usr/lib\ -ljvm' \
    JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/jre/lib/amd64/server:/usr/lib/jvm/jre/lib/amd64:/usr/lib/jvm/java/lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib \
    > /dev/null 2>&1 || exit 0

You can probably configure Java for R manually and then install for example rJava as a standard R package as described in the Installation paragraph at https://www.rforge.net/rJava/.

On CentOS 7, I performed the following steps:

  • as root:

    • install R base packages, without using the existing R-java:

      # yum install R-core.x86_64 R-core-devel.x86_64

    • install a JDK (not only a JRE);

  • as a non-privileged user:

    $ export JAVA_HOME=/path/to/jdk

    $ export PATH=$JAVA_HOME/bin:$PATH

    $ su

    # R CMD javareconf

    # R

    > install.packages('rJava')

You can find more information on installing a JDK at How to install Jdk in centos. Be careful to download the latest JDK release available on RHEL5.

Community
  • 1
  • 1
Christophe
  • 119
  • 12