I (and some colleagues) have been working on a package that depends on rJava. The program we connect to needs Java 11+ to run, and we’re running into some problems while trying to configure the .travis.yml file.
language: r warnings_are_errors: true sudo: required cache: packages apt_packages: - r-cran-rjava
I get error:
I get the following error message: Failed with error: ‘.onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/home/travis/R/Library/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or directory’
then I tweak the yml file a bit:
language: r warnings_are_errors: true sudo: required cache: packages apt_packages: - default-jdk before_install: - export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 - export PATH=$PATH:$JAVA_HOME/bin - export LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib - sudo R CMD javareconf
error I get then:
The command "sudo R CMD javareconf" failed and exited with 1 during .