For the R packages ReporteRs (also rJava and xlsx), need to get java installed in the right way.
Here are Mac instructions:
On linux, I did:
sudo apt update
sudo apt install default-jre default-jdkAnd then in my ~/.bashrc file, I included
export JAVA_HOME="/usr/lib/jvm/default-java"I also needed to run
R CMD javareconfAlternatively, to install the latest version
sudo apt install openjdk-25-jdk openjdk-25-jre