Rootserver Sponsor

webtropia"

Donations

Please support your operating system's further development:

donate"

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
snvvOffline
Post subject: r-cran-rjava does not load [solved]  PostPosted: 04.07.2015, 23:26



Joined: 2010-09-13
Posts: 331

Status: Offline
When I try to load rjava in R-project or RStudio, I get the following errors:
      Code:
> library("rJava", lib.loc="/usr/lib/R/site-library")
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/usr/lib/R/site-library/rJava/libs/rJava.so':
  libjvm.so: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘rJava’


My java configuration is
      Code:
# update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------                                                                                                                                   
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode                                                                                                             
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode                                                                                                           
  2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode                                                                                                           
  3            /usr/lib/jvm/jre-8-oracle-x64/bin/java           317       manual mode       


Is something that I can do?
Thank you


Last edited by snvv on 10.07.2015, 06:39; edited 2 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
LatOffline
Post subject: RE: r-cran-rjava does not load  PostPosted: 09.07.2015, 22:58



Joined: 2010-09-19
Posts: 204

Status: Offline
I'd install r-cran-rjava
 
 View user's profile Send private message  
Reply with quote Back to top
snvvOffline
Post subject: RE: r-cran-rjava does not load  PostPosted: 10.07.2015, 06:13



Joined: 2010-09-13
Posts: 331

Status: Offline
r-cran-rjava is installed but it does not load
      Quote:
> library("rJava", lib.loc="/usr/lib/R/site-library")
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/lib/R/site-library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘maxent’
Error: package or namespace load failed for ‘rJava’


maxent package cannot be installed becouse it requires rjava
 
 View user's profile Send private message  
Reply with quote Back to top
snvvOffline
Post subject: RE: r-cran-rjava does not load  PostPosted: 10.07.2015, 06:38



Joined: 2010-09-13
Posts: 331

Status: Offline
problem solved
I used update-alternatives --config java to find java path
then
Inside ~/.profile I added
export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java
and then (as root)
R CMD javareconf

After that rjava loaded


still maxent can't be installed but this is another problem.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio