1

I'm trying to install the xlsx package on my mac, but I keep getting the error

JavaVM FATAL: Failed to load the jvm library

So, I've tried to follow the advice found in this answer, but I get hung up on the last step - installing rJava. The error message(s) I get are

> install.packages("rJava",type='source') trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-8.tar.gz' Content type 'application/x-gzip' length 656615 bytes (641 KB) ================================================== downloaded 641 KB * installing *source* package ‘rJava’ ... ** package ‘rJava’ successfully unpacked and MD5 sums checked checking for gcc... /usr/local/opt/llvm/bin/clang -fopenmp checking whether the C compiler works... no configure: error: in `/private/var/folders/nz/5zx8zy7d1yg4fxhtttcl7s_c0000gn/T/RtmpB2wCzM/R.INSTALL139d1a450fb0/rJava': configure: error: C compiler cannot create executables See `config.log' for more details ERROR: configuration failed for package ‘rJava’ * removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rJava’ * restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rJava’ Warning in install.packages : installation of package ‘rJava’ had non-zero exit status The downloaded source packages are in ‘/private/var/folders/nz/5zx8zy7d1yg4fxhtttcl7s_c0000gn/T/RtmpD4AWyg/downloaded_packages’ 

Prior to this, when I run sudo R CMD javareconf I get

Java interpreter : /usr/bin/java Java version : 1.8.0_25 Java home path : /Library/Java/JavaVirtualMachines/jdk1.8.0_25.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 /usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/../include/darwin -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c conftest.c -o conftest.o /usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/llvm/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/jdk1.8.0_25.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_25.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 Done. 

Any tips for fixing this issue?

10
  • The error states the C compiler isn't working... maybe post the contents of config.log, as it might glean more information. Commented Apr 19, 2017 at 17:28
  • Hmm I can't find config.log. Any suggestion where to look for it? Commented Apr 19, 2017 at 18:03
  • Try checking in /private/var/folders/nz/5zx8zy7d1yg4fxhtttcl7s_c0000gn/T/RtmpD4AWyg/ or in Console.app. Commented Apr 19, 2017 at 18:05
  • No luck finding it, unfortunately : / Commented Apr 19, 2017 at 18:12
  • Maybe try your users home directory also... Commented Apr 19, 2017 at 18:14

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.