我已经通过我的R工作室安装了XLConnect软件包。当我尝试加载库时,我收到以下错误
> 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
我检查了/Library/Frameworks/R.framework/Versions/3.4/Resources/library
文件夹,发现所有三个提到的库(XLConnect
,XLConnectJars
,rJava
)已经存在。