One rJava problem in R
New version of R has wrong path of libjvm.so
Error pops up:
1 | libjvm.so: cannot open shared object file: No such file or directory |
Solution (From https://stackoverflow.com/questions/28462302):
- Find your R location. It will be stored in
rsession-ld-library-pathinrserver.conffile. Or just by doingwhich R. The location usually is/usr/lib64/R/libor/usr/lib64/microsoft-r/3.3/lib64/R/lib - Find the
libjvm.sofile which is usually in theusr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/serverpath depending on which jre you’re using. Check in $JAVA_HOME environment. - Create a symlink using
ln -ssudo ln -s /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib64/microsoft-r/3.3/lib64/R/lib/libjvm.so - Restart R server