Я пытаюсь установить rJava на MacOS Sierra. Нужно попробовать советы и руководства в других местах для других MacOS, таких как https://github.com/snowflakedb/dplyr-snowflakedb/wiki/Configuring-R-rJava-RJDBC-on-Mac-OS-X и установить xlsx и rJava на Mac
но это не сработает. Очень ценю любую помощь. Благодарю.
Версия для моего Mac: macOS Sierra, версия 10.12.15 Версия для моего R: 3.4.0 (2017-04-21) Версия для моего Rstudio: Версия 0.99.903
Версия Java:
bash-3.2$ /usr/libexec/java_home -V
bash-3.2$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
bash-3.2$ R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.8.0_131
Java home path : /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Non-system Java on macOS
trying to compile and link a JNI program
detected JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -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
clang -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/.. -framework R -Wl,-framework -Wl,CoreFoundation
JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
override rw-r--r-- root/admin for /Library/Frameworks/R.framework/Resources/etc/Makeconf? (y/n [n]) n
not overwritten
override rw-r--r-- root/admin for /Library/Frameworks/R.framework/Resources/etc/ldpaths? (y/n [n]) n
not overwritten
Done.
Когда я попытался установить rJava, я запустил
'R --quiet -e 'install.packages("rJava", type="source", repos="http://cran.us.r-project.org")'
Я получил ошибки:
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
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava
The downloaded source packages are in
‘/private/var/folders/w8/ksbj8dh15bz2lkss7h2tpzk80000gn/T/Rtmp6r9HI0/downloaded_packages
Warning message:
In install.packages("rJava", type = "source", repos = "http://cran.us.r-project.org") :
installation of package ‘rJava had non-zero exit status
Я побежал:
"curl -#ROL https://www.rforge.net/rJava/snapshot/rJava_0.9-8.tar.gz
R CMD INSTALL rJava_0.9-8.tar.gz"
и получил следующие сообщения об ошибках:
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
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava
Я не знаю что делать. Спасибо за вашу помощь.