Skip to content
Back to formatted view

Raw Message

Message-ID: <8ec76081003091332i787b05b2oa2bc4980448b85db@mail.gmail.com>
Date: 2010-03-09T21:32:55Z
From: Whit Armstrong
Subject: rJava works on karmic for root but not for user sean
In-Reply-To: <8ed68eed1003091032i766ef06foa1e2350ed2ee8684@mail.gmail.com>

make sure you don't have JAVA_HOME set in your environment for user sean.

just a guess, but have been stung by that one before.

-Whit


On Tue, Mar 9, 2010 at 1:32 PM, Sean O'Riordain <seanpor at acm.org> wrote:
> Good afternoon,
> A strange one - library(rJava) works for root but not for user sean
>
> On 64-bit Ubuntu 9.10, using R as root (sudo -i), I can say
> ?library(rJava)
> and it works fine with no error message of any kind. ?But logged in as
> myself user "sean", it can't start...
>
> sean at SeansPC:~$ R --no-save --vanilla
>
> R version 2.10.1 (2009-12-14)
> Copyright (C) 2009 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> ?Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> library(rJava)
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> ?unable to load shared library
> '/usr/local/lib/R/site-library/rJava/libs/rJava.so':
> ?libjvm.so: cannot open shared object file: No such file or directory
> Error : .onLoad failed in 'loadNamespace' for 'rJava'
> Error: package/namespace load failed for 'rJava'
>> sessionInfo()
> R version 2.10.1 (2009-12-14)
> x86_64-pc-linux-gnu
>
> locale:
> ?[1] LC_CTYPE=en_IE.UTF-8 ? ? ? LC_NUMERIC=C
> ?[3] LC_TIME=en_IE.UTF-8 ? ? ? ?LC_COLLATE=en_IE.UTF-8
> ?[5] LC_MONETARY=C ? ? ? ? ? ? ?LC_MESSAGES=en_IE.UTF-8
> ?[7] LC_PAPER=en_IE.UTF-8 ? ? ? LC_NAME=C
> ?[9] LC_ADDRESS=C ? ? ? ? ? ? ? LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_IE.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base
>>
>
> root at SeansPC:~# R CMD javareconf
> Java interpreter : /usr/bin/java
> Java version ? ? : 1.6.0_15
> Java home path ? : /usr/lib/jvm/java-6-sun-1.6.0.15/jre
> Java compiler ? ?: /usr/bin/javac
> Java headers gen.: /usr/bin/javah
> Java archive tool: /usr/bin/jar
> Java library path:
> $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/lib:/usr/lib
> JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server
> -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L
> -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm
> JNI cpp flags ? ?: -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
>
> Updating Java configuration in /etc/R
> Done.
>
>
>
> The sessionInfo is identical for root
>
> I've un-installed and re-installed r-base and r-cran-*
>
> I've done a reboot; I've done 'R CMD javareconf'
>
> The file /usr/local/lib/R/site-library/rJava/libs/rJava.so and any
> nearby files and paths are readable by user sean...
>
> I've searched the archives, I've googled... (possibly missing some
> vital clue of course!)
>
> I've removed the personal R library completely - I've checked libPath()
>
> java is available at the commandline both as root and as sean
>
> I've tried adding files to a new file in /etc/ld.so.conf.d ? and doing
> an ldconfig ... but I can't see how this would be different for root
> and sean.
>
> The only thing that I think changed was there was various ubuntu
> updates this morning which asked for a reboot - so I did... and was
> unable to go with the latest kernel so I'm with a previous version -
> I'm not sure it is the same as before.
>
> If I say do a R CMD javareconf I get different results which may be a
> clue... but it does appear to point to the same place in the end...
>
> sean at SeansPC:~$ R CMD javareconf
> Java interpreter : /usr/lib/jvm/java-6-sun-1.6.0.15/jre/bin/java
> Java version ? ? : 1.6.0_15
> Java home path ? : /usr/lib/jvm/java-6-sun-1.6.0.15
> Java compiler ? ?: /usr/lib/jvm/java-6-sun-1.6.0.15/bin/javac
> Java headers gen.: /usr/lib/jvm/java-6-sun-1.6.0.15/bin/javah
> Java archive tool: /usr/lib/jvm/java-6-sun-1.6.0.15/bin/jar
> Java library path:
> $(JAVA_HOME)/jre/lib/amd64/server:$(JAVA_HOME)/jre/lib/amd64:$(JAVA_HOME)/jre/../lib/amd64::/usr/java/packages/lib/amd64:/lib:/usr/lib
> JNI linker flags : -L$(JAVA_HOME)/jre/lib/amd64/server
> -L$(JAVA_HOME)/jre/lib/amd64 -L$(JAVA_HOME)/jre/../lib/amd64 -L
> -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm
> JNI cpp flags ? ?: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
>
> Updating Java configuration in /etc/R
> /usr/lib64/R/bin/javareconf: line 323: /etc/R/Makeconf.new: Permission denied
> *** cannot create /etc/R/Makeconf.new
> *** Please run as root if required.
> sean at SeansPC:~$ sudo -i
> [sudo] password for sean:
> root at SeansPC:~# R CMD javareconf
> Java interpreter : /usr/bin/java
> Java version ? ? : 1.6.0_15
> Java home path ? : /usr/lib/jvm/java-6-sun-1.6.0.15/jre
> Java compiler ? ?: /usr/bin/javac
> Java headers gen.: /usr/bin/javah
> Java archive tool: /usr/bin/jar
> Java library path:
> $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/lib:/usr/lib
> JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server
> -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L
> -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm
> JNI cpp flags ? ?: -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
>
> Updating Java configuration in /etc/R
> Done.
>
> Any help would be appreciated.
>
> Thanks in advance,
> Se?n
>
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
>