3

I'm looking to install the rJava package on macOS High Sierra with Java 9. The steps I'm following are:

  1. Installed Apple Java 6
  2. Installed Java 9 from Oracle
  3. Terminal command: sudo R CMD javareconf
  4. 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?

Christopher Costello
  • 1,186
  • 2
  • 16
  • 30

1 Answers1

0

see another question I installed llvm with brew and got version 9 to High Sierra's version 10 from Apple. rJava then installed using:

 install.packages("rJava",,"http://rforge.net")

as noted on the github page.

Chris
  • 820
  • 7
  • 22