Issues with loading XLConnect library in R - r

I have installed XLConnect package though my R studio. When I try to load the library I get the following error
> library(XLConnect)
Loading required package: XLConnectJars
Error: package or namespace load failed for ‘XLConnectJars’:
.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
Error: package ‘XLConnectJars’ could not be loaded
I checked the /Library/Frameworks/R.framework/Versions/3.4/Resources/library folder and I am noticed all three mentioned libraries(XLConnect, XLConnectJars, rJava) already present.

Related

Error: package or namespace load failed for ‘ChemmineOB’. Anyone knows how to solve it?

I installed ChemmineR and ChemmineOB on my MacOSX (MaxOS Ventura; R version 4.2.1) and got this:
library(ChemmineOB)
Error: package or namespace load failed for ‘ChemmineOB’:
.onLoad failed in loadNamespace() for 'ChemmineOB', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/ChemmineOB/libs/ChemmineOB.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/ChemmineOB/libs/ChemmineOB.so, 0x000A): Library not loaded: /usr/local/opt/open-babel/lib/libopenbabel.7.dylib
Referenced from: <77D86F2D-1FC2-3CDF-81D4-73A54E882F99> /Library/Frameworks/R.framework/Versions/4.2/Resources/library/ChemmineOB/libs/ChemmineOB.so
Reason: tried: '/usr/local/opt/open-babel/lib/libopenbabel.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/open-babel/lib/libopenbabel.7.dylib' (no such file), '/usr/local/opt/open-babel/lib/libopenbabel.7.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libopenbabel.7.dylib' (no such file), '/Users/hanyan/l

‘rJava’ could not be loaded after installing R version 3.4

Loading required package: xml2
Loading required package: rJava
Loading required package: methods
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/r Java.so
Reason: image not found
Error: package ‘rJava’ could not be loaded
Execution halted
I'm getting this error a day after I installed version 3.4 of R. I tried solutions from other pages but it didn't work. I can't run R scripts through the terminal but I run scripts on RStudio. I'm thinking that it might be a problem with paths, but I just wanted to double check here and confirm instead of getting myself into a deeper mess.

Issue while connecting rJava in R Studio

I installed the rJava package but it's showing the following issue while using the library
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 '/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

loading a data gives an error constantly

I have read this post because I also have a Mac and nothing changed
rJava load error in RStudio/R after "upgrading" to OSX Yosemite
when I try to load xlsx library I get the following error
Loading required package: 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 '/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
Error: package ‘rJava’ could not be loaded
I cannot figure out what is wrong
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 '/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
does anyone know how to fix it?

Can't install 'ks' package in R

I'm using R 3.0.2 and RStudio 0.98.945 for Mac.
Loading 'ks' package gives this error message.
Loading required package: rgl
Error : .onLoad failed in loadNamespace() for 'rgl', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/r gl.so, 6): Library not loaded: /usr/X11/lib/libGLU.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/rgl.so
Reason: image not found
Error: package ‘rgl’ could not be loaded
Loading 'rgl' package gives the same error message.
How can I solve this?

Resources