[R] Some install package fixes for Ubuntu Hardy

From: John C Nash <nashjc_at_uottawa.ca>
Date: Thu, 26 Mar 2009 09:45:51 -0400

I encountered some failures in using install.packages() to install rgl and rJava in some of my (multiple) Ubuntu Hardy systems. A quick search of the 'Net did not show any debian packages for these. The install.packages messages said header or other files were missing, suggesting path and related woes. Email with Duncan Murdoch (thanks!) pointed the way with rgl and led to a fix for rJava in similar fashion. It may save others some frustration to know my resolution. See below.

However, I do have a question which a brief rummage of r-project did not answer. Where should information like this be put? My opinion is that it should go on the wiki, but possibly there is a better solution if we can get the right messages into the package installers, though I recognize the load that puts on maintainers.

Cheers, JN

Ubuntu Hardy rgl install fix:

The headers gl.h and glu.h are installed with the "dev" packages libgl1-mesa-dev and libglu1-mesa-dev. So the fix is to run (in at terminal as root)

apt-get install libgl1-mesa-dev
apt-get install libglu1-mesa-dev

then
R
.....
install.packages("rgl")

etc.

Ubuntu Hardy rJava install fix:

Needed to get Sun JDK (not JRE)

Then add new
ln -s /usr/java/jdkxxxxx/bin/java java
and
ln -s /usr/java/jdkxxxxx/bin/javac javac

where xxxxxx is the version information on the jdk directory name -- in my case 1.6.0_13 (see below)

Then

R CMD javareconf

still fails to find the java compiler.

Seems $JAVA_HOME may not be defined.

Try
export JAVA_HOME="/usr/java/jdk1.6.0_13/"

Then (as root)

R CMD javareconf

seems to work.
Then rJava installed OK. I was then able to install RWeka (my original objective) and it seems to run OK.



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. Received on Thu 26 Mar 2009 - 12:49:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Mar 2009 - 02:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive