I recently upgraded OSX from Mojave to Catalina. After the upgrade I couldn't run JGR() package in Rstudio because rJava could not be loaded. I repeatedly get the error:
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
Last time I had this problem (in OSX Mojave) I installed all packages using "install.packages("data", type = "binary"), however this doesn't solve the problem this time.
Can anyone help me and fix this problem? Any solutions how to proceed?
Same problem with me after update Catalina. I tried many methods posted online, while none of them works.
According to the error message, it seems that Rstudio under Catalina could only run JDK11.0.1
. So I uninstalled my JDK13.0.4 and then install the old version JDK11.0.1
, and it works for me.
Maybe you can try install JDK11.0.1
.
I had the same problem after upgrading from Mojave to Catalina. Long story short, this is the only solution that worked for me:
In the terminal, use the following command
install_name_tool -change /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib \
/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/jre/lib/server/libjvm.dylib \
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With