gpt4 book ai didi

r - 无法加载 rJava 库

转载 作者:行者123 更新时间:2023-12-02 04:28:41 25 4
gpt4 key购买 nike

我正在运行 RSTudio 版本 1.1.442 和 R3.5。当我尝试加载 rJava 时,出现以下错误;

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.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-9.jdk/Contents/Home/lib/server/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so Reason: no suitable image found. Did find: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib: mach-o, but wrong architecture /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libclient.dylib: mach-o, but wrong architecture

我已尝试卸载并重新安装 Java,但没有成功运行终端命令 R CMD javareconf。

感谢您的帮助。

最佳答案

感谢您的建议。第二次重新安装 Java 就成功了。

关于r - 无法加载 rJava 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50975551/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com