简体   繁体   中英

Can't load rJava library

I am running RSTudio Version 1.1.442 and R3.5. When I try to load rJava I get the following error;

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

I have tried uninstalling and reinstalling Java and have run the terminal command R CMD javareconf without success.

Thanks for your help.

Thanks for the suggestions. A second réinstallation of Java did the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM