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
Related
> library(**xlsx**)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘xlsx’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JVM could not be found
In addition: Warning messages:
1: In system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
2: In fun(libname, pkgname) :
Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)
#then I tried 'writexlx' but then that began giving me error messages
>BiocManager::install('**writexslx**')
Bioconductor version 3.11 (BiocManager 1.30.10), R 4.0.2 (2020-06-22)
Installing package(s) 'writexslx'
Warning message:
package ‘writexslx’ is not available (for R version 4.0.2)
#I am not sure how to download this, please help
I evene tried to download jdk and that hasn't worked for me either.
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
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!
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!
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')