我最近将OSX从Mojave升级到Catalina。升级后,我无法在Rstudio中运行JGR()软件包,因为rJava无法加载。我一直收到以下错误:
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.6/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/r .Java/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/li .bs/rJava.so
Reason: image not found
Error: package ‘rJava’ could not be loaded
上次我在OSX Mojave中遇到这个问题时,我使用“install.packages(”data“,type =”binary“)”安装了所有软件包,但这次并没有解决问题。
有人能帮我解决这个问题吗?有什么解决方案可以继续吗?