I am trying to install xlsx package on Ubuntu in R in order to use a function allowing to insert links in R and then export them to Excel. Having said that, I simply can't install the package. Apparently it has to do wit rJava but I can't figure out a solution. Any hint? Here's the message I receive:
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/lib/R/site-library/rJava /libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error : package ‘rJava’ could not be loaded
ERROR: lazy loading failed for package ‘xlsx’
* removing ‘/home/.../x86_64-pc-linux-gnu-library/3.2/xlsx’
Warning in install.packages :
installation of package ‘xlsx’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpsjilCH/downloaded_packages’
I'm reluctant to install Java on my own machine, but you could try installing a Java runtime environment:
before trying again (perhaps starting by manually install
rJava
as @Bhas suggests).Instead of a java-based solution though, why not try
readxl
which has no external dependencies: