[R] Some install package fixes for Ubuntu Hardy
John C Nash
nashjc at uottawa.ca
Thu Mar 26 14:45:51 CET 2009
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.
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
Ubuntu Hardy rJava install fix:
Needed to get Sun JDK (not JRE)
Then add new
ln -s /usr/java/jdkxxxxx/bin/java java
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)
R CMD javareconf
still fails to find the java compiler.
Seems $JAVA_HOME may not be defined.
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.
More information about the R-help