I'm looking to install the rJava
package on macOS High Sierra with Java 9. The steps I'm following are:
- Installed Apple Java 6
- Installed Java 9 from Oracle
- Terminal command:
sudo R CMD javareconf
- Attempted to install rJava from source with terminal command:
unset JAVA_HOME; R --quiet -e 'install.packages("rJava", type="source", repos="http://cran.us.r-project.org")'
Then I got the following error:
clang: error: unsupported option '-fopenmp'
make[2]: *** [libjri.jnilib] Error 1
make[1]: *** [src/JRI.jar] Error 2
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’
I've tried following the instructions here but the first command:
brew install homebrew/versions/gcc49 --without-multilib
Does not work anymore. Does anybody have a modern solution to this ever-evolving problem?