library(rJava) in Rstudio gives the error :
Solution : add
export LD_LIBRARY_PATH=/usr/lib/jvm/java-8-oracle/lib/amd64:/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server
into /etc/bash.bashrc , then run
. /etc/bash.bashrc
then run
sudo R CMD javareconf
then restart Rstudio
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/anh/Rlibs/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Solution : add
export LD_LIBRARY_PATH=/usr/lib/jvm/java-8-oracle/lib/amd64:/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server
into /etc/bash.bashrc , then run
. /etc/bash.bashrc
then run
sudo R CMD javareconf
then restart Rstudio
No comments:
Post a Comment