因此,我尝试在R-studio中安装bartMachine软件包,该软件包将安装依赖项rJava ...但是,我很难让rJava在我的macOS上运行。
这个问题已被问过多次,但似乎没有一种解决方案对我有用。
这是我尝试加载rJava库时在R-Studio中遇到的错误:
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.5/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.5/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.5/Resources/library/rJava/libs/rJava.so
Reason: image not found
我尝试重新安装JDE,JDK等,但是似乎没有任何作用...当我在终端中运行java -version
时,它向我显示了此信息:
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
我正在使用macOS Mojave,版本:10.14.3 ...和R-Studio版本:1.1.456。
关于如何解决此问题的任何建议?