I installed the OpenStreetMap package in R but every time I load the package, I get the following error:
Error: package or namespace load failed for ‘OpenStreetMap’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Can someone explain what could be happening?
Thanks!
I think you have to add JAVA_HOME as a new PATH environment variable. I found all the usefull informations about java here: http://www.ntu.edu.sg/home/ehchua/programming/howto/JDK_HowTo.html
Related
I know there are a lot of questions on this issue. I have previously solved that problem with:
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
but I have instaled R 4.2.1 in a new PC and I am not able to fix it this time,
I have succesfully installed rJava package but when I try above code I get this error:
Error: package or namespace load failed for 'tabulizerjars':
.onLoad failed in loadNamespace() for 'tabulizerjars', details:
call: NULL
error: .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
I have re-installed rJava several times but I keep getting the same error.
I would appreciate any help about it.
I'm pretty new to R in Ubuntu.
I am running R (3.5.0) in Rstudio 1.1.456 through Anaconda.
The operating system is Ubuntu 18.04.
In R studio I select the package Rcmdr:
> library("Rcmdr", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: carData
Loading required package: sandwich
Loading required package: effects
lattice theme set by effectsTheme()
See ?effectsTheme for details.
Error: package or namespace load failed for ‘Rcmdr’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Can't find a usable init.tcl in the following directories:
/builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library
This probably means that Tcl wasn't installed properly.
I then tried package tcltk by itself:
> library("tcltk", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Can't find a usable init.tcl in the following directories:
/builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library
This probably means that Tcl wasn't installed properly.
Following the question here:
Error ".onLoad failed in loadNamespace() for 'tcltk'"
> capabilities("tcltk")
tcltk
TRUE
Unfortunately the solution above only deals with the case where capabilities("tcltk") comes back with FALSE so I'm stuck at this point!
Also the package tk is showing as installed already in line with the suggestion by J_F in the comments to the original question:
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
Can someone please tell me how to resolve this.
I need to use the package "xlsx" to export some data on R to excel, but that package requires rJava to run. Whenever I use library(rJava) to call rJava, I get the following error:
Error:.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Error: package 'rJava' could not be loaded
I honestly cannot make heads or tails of it. What can I do to fix it?
I'm getting the error below involving the RWeka library, when trying to knit a markdown file into html with Knitr in Rstudio. Any tips would be greatly appreciated.
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Quitting from lines 14-20 (Milestone_Report.Rmd)
Error: package or namespace load failed for 'RWeka'
Execution halted
Please install latest version of Java and set value for JAVA_HOME variable as the directory where you installed Java. Once done try library(RWeka) and see if you are getting error. Hope this should solve the problem.
I had some issues installing rJava first. Then I found this solution.
Unfortunately I get following error, when loading the package:
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/informatik2/students/home/1jendryc/R/x86_64-pc-linux-gnu-library/3.1/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘rJava’
Still this file exists and even the path is correct
~/R/x86_64-pc-linux-gnu-library/3.1/rJava/libs$ ls
rJava.so
So I tried that approach, but it didn't worked.
I have no possibility to get root easily, cause I am working at my university at a pool computer.
Cheers.
Your issue is something different. What message says is that it can't find "libjvm.so". You need to properly configure Java, rJava and R. Take a look here
http://www.owsiak.org/?p=3671
where all the caveats are listed when it comes to working with R and Java.