简体   繁体   中英

Unable to use package rJava on Macbook with Apple M1 Chip, Get the error below

> library(rJava)
Error: package or namespace load failed for ‘rJava’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(jli, FALSE)
  error: unable to load shared object '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib':
  dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 10): no suitable image found.  Did find:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib: mach-o, but wrong architecture
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib: mach-o, but wrong architecture

Please note: I have the Java installed from https://www.oracle.com/java/technologies/downloads/#java8-mac and when asked, I allowed it use the Rosetta way.

Has anyone been able to make this work? Can you please help. I need rJava on Mac with M1 Chip.

OK. rJava on M1 will only work with JDK 17 aarch64 version. Since that has native support.

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