4

I am trying to install package "xlsx" in RStudio on a mac. It tries to install rJava and I get the following error:

checking whether Java run-time works... No Java runtime present, requesting install.

no configure: error: Java interpreter '/usr/bin/java' does not work ERROR: configuration failed for package ‘rJava’ * removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava’ * restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava’ Warning in install.packages : installation of package ‘rJava’ had non-zero exit status

It prompts me to go download Java and I do. Once it is done installing I try to install package rJava again in RStudio and it give me the exact same error and prompts me to download Java again.

I can see Java in my system preferences but when I go to the terminal and type java -version I get the same prompt to go download Java. It's like my computer just isn't recognizing Java.

Any idea for how I can fix this and get rJava installed?

Thank you!

1

2 Answers 2

2

I was having the same issue at linux... From "/usr/bin/java" you are using Linux, presume this is also the case. The required Java installer can be installed as described here in linux terminal

sudo apt-get install default-jre
sudo apt-get install default-jdk

by restarting R installation worked

Sign up to request clarification or add additional context in comments.

Comments

0

I had similar problems, and went to use openXLSX which doesn't require Java.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.