2

I've installed the XLConnect package and attempted to load it in my R script. However, an error occured as below. As I have no knowledge about Java, after googled around I still find no way to solve this.

> 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
Cecilia Lee
  • 775
  • 1
  • 11
  • 20
  • Looks like a Java installation/configuration issue. The suggestions in the following SO question may help: https://stackoverflow.com/questions/30738974/rjava-load-error-in-rstudio-r-after-upgrading-to-osx-yosemite – Martin Studer Dec 30 '17 at 07:50
  • If there is no specific requirement for XLConnect, try `openxlsx`. It is not dependent on java. – Theo Jun 23 '19 at 17:37

0 Answers0