[Rd] problems installing rJava with R-2.8.0
Joris @ VU
jsnel at few.vu.nl
Sun Nov 9 20:35:56 CET 2008
Hello Christian,
I had the same problem with running install.packages("rJava"), exactly
the same error as you. Turned out the solution was changing a 7 into a
6 somewhere ... please allow me to explain :)
Of course the first thing I did, and I suppose you did is follow the
advice of Simon Urbanek, run "R CMD javareconf" as root, or if that
doesn't work "R CMD javareconf -ed". This is the output of that:
===============
linux:/usr/lib/jvm # R CMD javareconf -ed
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version : 1.6.0_06
Java home path : /usr/lib/jvm/java-1.6.0-sun-1.6.0.u6/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
$(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/i386/server
-L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L
-L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm
JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
Updating Java configuration in /usr/lib/R
Done.
===============
Done. That means "everything is ok" ... right? No. Look at the first
line ... "*** JAVA_HOME is not a valid path, ignoring".
I figured that's odd, I had no trouble running "java" or "javac" on my
computer ... so I ran "$JAVA_HOME"
===============
linux:/usr/lib/jvm # $JAVA_HOME
bash: /usr/lib/jvm/java-1.6.0-sun-1.6.0.u7: No such file or directory
===============
Strange, that seemed to be the correct path ... but upon closer
inspection I realized I didn't have update 7 but update 6, so the
correct path would be "/usr/lib/jvm/java-1.6.0-sun-1.6.0.u6". I used
to have 7 (downloaded from the Sun website) but removed it and
installed the version from the openSUSE repositories instead, I guess
somehow JAVA_HOME was not updated, even after running
"update-alternatives --config javac". Exporing JAVA_HOME manually did
the trick for me, so running as root:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-sun-1.6.0.u6
Then running "R CMD javareconf " worked without warning this time. And
then running R and "install.package("rJava")" worked without trouble.
Still I'm curious where that magical config.log file is located,
perhaps that would have pointed out my mistake right away.
Best,
Joris
On Wed, Oct 29, 2008 at 17:10, Simon Urbanek
<simon.urbanek at r-project.org> wrote:
>
> On Oct 29, 2008, at 11:51 , Christian Kohler wrote:
>
>> Dear R-developers,
>>
>> I am having trouble installing rJava on R 2.8.0 / debian etch.
>>
>> What goes wrong?
>>
>
> Please send me the config.log. Also make sure you have configured R with
> Java support (sudo R CMD javareconf).
>
> Cheers,
> S
>
>
>>
>>> install.packages("rJava")
>>
>> Warning in install.packages("rJava") :
>> argument 'lib' is missing: using
>> '/nfs/compdiag/package/R/lib/bioconductor/release_2.3/x86_64'
>> --- Please select a CRAN mirror for use in this session ---
>> Loading Tcl/Tk interface ... done
>> trying URL 'http://cran.rakanu.com/src/contrib/rJava_0.6-0.tar.gz'
>> Content type 'application/x-gzip' length 234704 bytes (229 Kb)
>> opened URL
>> ==================================================
>> downloaded 229 Kb
>>
>> * Installing *source* package 'rJava' ...
>> checking for gcc... gcc -std=gnu99
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... yes
>> checking whether we are cross compiling... no
>> checking for suffix of executables...
>> checking for suffix of object files... o
>> checking whether we are using the GNU C compiler... yes
>> checking whether gcc -std=gnu99 accepts -g... yes
>> checking for gcc -std=gnu99 option to accept ISO C89... none needed
>> checking how to run the C preprocessor... gcc -std=gnu99 -E
>> checking for grep that handles long lines and -e... /bin/grep
>> checking for egrep... /bin/grep -E
>> checking for ANSI C header files... yes
>> checking for sys/wait.h that is POSIX.1 compatible... yes
>> checking for sys/types.h... yes
>> checking for sys/stat.h... yes
>> checking for stdlib.h... yes
>> checking for string.h... yes
>> checking for memory.h... yes
>> checking for strings.h... yes
>> checking for inttypes.h... yes
>> checking for stdint.h... yes
>> checking for unistd.h... yes
>> checking for string.h... (cached) yes
>> checking sys/time.h usability... yes
>> checking sys/time.h presence... yes
>> checking for sys/time.h... yes
>> checking for unistd.h... (cached) yes
>> checking for an ANSI C-conforming const... yes
>> checking whether time.h and sys/time.h may both be included... yes
>> configure: checking whether gcc -std=gnu99 supports static inline...
>> yes
>> checking Java support in R... present:
>> interpreter : '/usr/lib/jvm/java-1.5.0-sun/jre/bin/java'
>> archiver : '/usr/lib/jvm/java-1.5.0-sun/bin/jar'
>> compiler : '/usr/lib/jvm/java-1.5.0-sun/bin/javac'
>> header prep.: '/usr/lib/jvm/java-1.5.0-sun/bin/javah'
>> cpp flags : '-I/usr/lib/jvm/java-1.5.0-sun/include
>> -I/usr/lib/jvm/java-1.5.0-sun/include/linux'
>> java libs :
>> '-L/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/amd64/server
>> -L/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/amd64
>> -L/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/../lib/amd64
>> -L/usr/local/lib64 -ljvm'
>> checking whether JNI programs can be compiled... yes
>> checking JNI data types... configure: error: One or more JNI types
>> differ from the corresponding native type. You may need to use
>> non-standard compiler flags or a different compiler in order to fix this.
>> ERROR: configuration failed for package 'rJava'
>> ** Removing
>> '/nfs/compdiag/package/R/lib/bioconductor/release_2.3/x86_64/rJava'
>>
>> The downloaded packages are in
>> /nfs/scratch/Rtmp/RtmpUMDzVa/downloaded_packages
>> Warning message:
>> In install.packages("rJava") :
>> installation of package 'rJava' had non-zero exit status
>>
>>
>>> sessionInfo()
>>
>> R version 2.8.0 (2008-10-20)
>> x86_64-unknown-linux-gnu
>>
>> locale:
>> C
>>
>> attached base packages:
>> [1] stats graphics grDevices utils datasets methods base
>>
>> loaded via a namespace (and not attached):
>> [1] tcltk_2.8.0 tools_2.8.0
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> Christian Kohler
>> Institute of Functional Genomics
>> Computational Diagnostics
>> University of Regensburg (BioPark I)
>> D-93147 Regensburg (Germany)
>>
>> Tel. +49 941 943 5055
>> Fax +49 941 943 5020
>> christian.kohler at klinik.uni-regensburg.de
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
More information about the R-devel
mailing list