
To fix this error: clang: error: unsupported option '-fopenmp Sudo ln -f -s /usr/local/lib/libjvm.dylib /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/ You may need to use non-standard compiler flags or a different compiler in order to fix this.ĭo this: sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib configure: error: One or more JNI types differ from the corresponding native type. To fix this error: checking JNI data types. Make sure you run the following, if you've updated Java (remember you need the JDK, not JRE). Why use R CMD INSTALL? This will keep the config.log file that will allow you to debug things install.packages() does not and help you get might not be very helpful in that case (e.g. Thanks for your help.Ĭomments using OSX 10.12.6 with Java 1.8.0_181 and dealing with the above issue and another issue related to compiling rJava. Installation of package ‘rJava’ had non-zero exit statusĪnd got the following error messages: clang: error: unsupported option '-fopenmp' In install.packages("rJava", type = "source", repos = "") : ‘/private/var/folders/w8/ksbj8dh15bz2lkss7h2tpzk80000gn/T/Rtmp6r9HI0/downloaded_packages’ * restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava’ * removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava’ I got the errors: clang: error: unsupported option '-fopenmp'ĮRROR: compilation failed for package ‘rJava’
#Cran r for mac os v10.12.5 sierra install#
When I tried to install rJava, I ran `R -quiet -e 'install.packages("rJava", type="source", repos="")` Override rw-r-r- root/admin for /Library/Frameworks/R.framework/Resources/etc/ldpaths? (y/n ) n Override rw-r-r- root/admin for /Library/Frameworks/R.framework/Resources/etc/Makeconf? (y/n ) n Updating Java configuration in /Library/Frameworks/R.framework/Resources JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm JNI cpp flags : -I$(JAVA_HOME)/./include -I$(JAVA_HOME)/./include/darwin

Java library path: $(JAVA_HOME)/lib/server JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre framework R -Wl,-framework -Wl,CoreFoundation Java home path : /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jreĭetected JNI cpp flags : -I$(JAVA_HOME)/./include -I$(JAVA_HOME)/./include/darwinĭetected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvmĬlang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/./include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/./include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c conftest.c -o conftest.oĬlang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server -ljvm -F/Library/Frameworks/R.framework/. Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java version: bash-3.2$ /usr/libexec/java_home -V My Mac version: macOS Sierra, version 10.12.15 Have to tried the tips and guides elsewhere for other other version MacOS such as īut it does not work out.

I'm trying to install rJava on MacOS Sierra.
