rJava and library(xlsx) installation problems on Ubuntu 18.04.1 LTS

Error Information:

I'm trying to install rjava, but get an error as follows. -
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/salvatore/R/x86_64-pc-linux-gnu-library/3.5/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/home/salvatore/R/x86_64-pc-linux-gnu-library/3.5/rJava’

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: 1.1.456
  • OS Version: Ubuntu 18.04.1 LTS
  • R Version: 3.5.1

From Troubleshooting Guide: Using RStudio

1 Like

Did you install Java itself?
As far as I remember, you'll need JDK for rJava. It's fairly straightforward on Ubuntu though.

1 Like

Yes it Is first thing I did after upgrading Ubuntu from 16 LTS to 18 LTS

The issue was solved, The problem was probably on R 3.5 version, I removed R 3.5 and installed R 3.4, after installing R studio, all thing works fine.
Solved Issue

2 Likes