Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install the RWeka package for R 2.14.1 running on Ubuntu Linux 12.04. I type:

install.packages("RWeka")

choose a mirror and it downloads.

Then I get these messages:

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.

If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.

ERROR: configuration failed for package ‘rJava’
* removing ‘/home/~/R/x86_64-pc-linux-gnu-library/2.14/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
* removing ‘/home/~/R/x86_64-pc-linux-gnu-library/2.14/RWekajars’
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
* removing ‘/home/~/R/x86_64-pc-linux-gnu-library/2.14/RWeka’

The downloaded packages are in
    ‘/tmp/RtmpZBJDM0/downloaded_packages’
Warning messages:
1: In install.packages("RWeka") :
  installation of package ‘rJava’ had non-zero exit status
2: In install.packages("RWeka") :
  installation of package ‘RWekajars’ had non-zero exit status
3: In install.packages("RWeka") :
  installation of package ‘RWeka’ had non-zero exit status

So I quit and type:

sudo apt-get install icedtea-7-plugin

Let that run, then:

root@ubuntu:~# R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.6.0_24
Java home path   : /usr/lib/jvm/java-6-openjdk-amd64/jre
Java compiler    : not present
Java headers gen.: 
Java archive tool: 
Java library path: /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
JNI linker flags : -L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/x86_64-linux-gnu/jni -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/jni -L/lib -L/usr/lib -ljvm
JNI cpp flags    : 

Updating Java configuration in /etc/R
Done.

Then I go back and start R and type install.packages("RWeka")

and get the same error message as before.

Any suggestions?

share|improve this question

migrated from stackoverflow.com Jul 23 '12 at 13:18

This question came from our site for professional and enthusiast programmers.

    
@ShivanRaptor: This looks like a problem that any user of R on Ubuntu could run in to, it's not really specific to sysadmins, I don't think? –  Marius Jul 23 '12 at 6:00

1 Answer 1

up vote 5 down vote accepted

It looks like you might have the JRE (Java Runtime Environment) installed, but not the JDK (Java Development Kit).

Try:

sudo apt-get install openjdk-6-jdk

Then try to install the package again.

share|improve this answer
    
Awesome, that did it thank you very much! –  screechOwl Jul 23 '12 at 6:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.