Hi and thanks in advance,
Don't know why but I get the following error message when trying to load a csv file in my RStudio desktop version that I have installed in my MAC:
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
Could you please help me? I have tried downloading the latest version of Java, but does not work.
Thanks!
Related
I am trying to run the JDBC package. however, that requires that I install the rjava package. when i install rjava library, i get the following error:
library(rJava)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
Reason: image not found
In addition: Warning message:
In system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
I'm working on sentiment analysis. I'm trying to use Rsentiment package in order to get the score for each sentence of my dataset. When I run the command I get a warning message related to an issue with Java. Does anyone of you have any suggestion? I run it on a Macbook. This is the message that I got:
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Errore: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
Inoltre: Warning message:
running command '/usr/libexec/java_home' had status 1
In the past, I have used the mailR package with no issues on both Mac and Windows. Ever since the last R/RStudio update, mailR and rJava will no longer work. I can install both packages just fine. But, I cannot load them with the library() command. When I try, I get the following errors:
> library(mailR)
>Error: package or namespace load failed for ‘mailR’: .onLoad failed in
loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Users/rotendd/Library/R/3.4/library/rJava/libs/rJava.so':
dlopen(/Users/rotendd/Library/R/3.4/library/rJava/libs/rJava.so, 6): Library
not loaded: #rpath/libjvm.dylib
Referenced from: /Users/rotendd/Library/R/3.4/library/rJava/libs/rJava.so
Reason: no suitable image found. Did find:
/Library/Frameworks/R.framework/Resources/lib/libjvm.dylib: mach-o, but
wrong architecture
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libclient.dyl
ib: mach-o, but wrong architecture
and
> library(rJava)
>Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Users/rotendd/Library/R/3.4/library/rJava/libs/rJava.so':
dlopen(/Users/rotendd/Library/R/3.4/library/rJava/libs/rJava.so, 6): Library
not loaded: #rpath/libjvm.dylib
Referenced from: /Users/rotendd/Library/R/3.4/library/rJava/libs/rJava.so
Reason: no suitable image found. Did find:
/Library/Frameworks/R.framework/Resources/lib/libjvm.dylib: mach-o, but
wrong architecture
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libclient.dyl
ib: mach-o, but wrong architecture
From what I have found just Googling around, it seems that I need to manually change a file path in one of the functions. I think I can find my way around the Java folders to get what I need but I'm not sure how to manually change a file path in a package like this.
I think I have all the pieces to fix this problem, I just need a little guidance on orchestrating my solution. Thanks!
I got a problem when I called 'XLConnect' library in R.
Loading required package: XLConnectJars JavaVM: requested Java version
((null)) not available. Using Java at "" instead. JavaVM: Failed to
load JVM: /bundle/Libraries/libserver.dylib JavaVM FATAL: Failed to
load the jvm library. Error : .onLoad failed in loadNamespace() for
'XLConnectJars', details: call: .jinit() error:
JNI_GetCreatedJavaVMs returned -1
Error: package ‘XLConnectJars’ could not be loaded
This error happened after I installed XLConnect and wrote library(XLconnect).
I googled this problem but there are no proper solution in my case.
I have already installed Java 8 and checked java location in terminal.
I run R in mac OS X (10.10.5)
Thank you for your help.
I solve the problem thanks to http://www.r-bloggers.com/getting-r-and-java-1-8-to-work-together-on-osx/
I am receiving this error when I use packages XLConnect and rJava.
Loading required package: XLConnectJars
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Program Files/R/R-3.2.2/library/rJava/libs/x64/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
I have not seen this specific error in any threads here on in this community. Though I do believe the issue to be related to some other threads.
I have downloaded 64-bit java, and have tried to fix the path to java with:
Sys.setenv(JAVA_HOME='C:\Program Files\\Java\\jre1.8.0_65\\bin\\client\\jvm.dll')