Installing rJava package in R¶
Problem¶
I tried an R deployment where there are some rJava
package requirements. The deployment build fails. How to fix it?
I'm getting errors, like:
checking whether Java run-time works... ./configure: line 3765: /usr/lib/jvm/default-java/bin/java: No such file or directory
no
configure: error: Java interpreter '/usr/lib/jvm/default-java/bin/java' does not work
ERROR: Configuration failed for package ‘rJava’
Solution¶
Your R library needs Java installed, this is not installed in UbiOps by default. Add a ubiops.yaml
file to your deployment package (same level as your deployment.R) with the following content to install Java:
apt:
packages:
- "default-jre"
- "default-jdk"
Upload your deployment package to UbiOps. It should now be able to install rJava
without problems.
Installing container-level packages
For more information on installing container-level packages, take a look at this page.