I want to install rJava
but this fails with the following suggestion:
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava’
* restoring previous
‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava’
Hence, I follow this suggestion (and the one everyone else seems to suggest) and run R CMD javereconf
in the terminal but now I get the message that zsh: command not found: R
.
How can I get R CMD javereconf
to work?
Thanks.
EDIT: While I followed the blogpost suggested by @Till, I still struggle to run R CMD javereconf
(same error). In the meantime, I figured that I should mention that I'm using MacOS Big Sur with an Apple M1 Chip.
When typing R.home()
RStudio returns /Library/Frameworks/R.framework/Resources/R
.