0

I have an account to Suse linux server, without root access. I have installed an R , and now I want to use FSELECTOR package. I have started with this steps:

$ whereis java
java: /usr/bin/java /usr/lib64/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz
$ R CMD javareconf -e
$unset JAVA_HOME

And then I have started R

Sys.setenv(JAVA_HOME='\\usr\\lib64\\java\\)
install.packages("FSelector")

During the installation process I have got this message:

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/korosig/R/x86_64-suse-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/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/RWekajars’
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/RWeka’
ERROR: dependency ‘RWeka’ is not available for package ‘FSelector’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/FSelector’

Any Ideа?

I want to install rJava, but i have got the same result.

Sys.setenv(JAVA_HOME='\\usr\\lib64\\jvm\\java-10-openjdk-10')
install.packages("rJava")
Installing package into ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)

......

4 warnings
make[1]: Leaving directory '/tmp/RtmpTkyyj5/R.INSTALLb60f4541cb34/rJava/jri'
installing via 'install.libs.R' to /home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
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/korosig/R/x86_64-suse-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/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava’

The downloaded source packages are in
        ‘/tmp/RtmpcwM6XO/downloaded_packages’
Warning message:
In install.packages("rJava") :
  installation of package ‘rJava’ had non-zero exit status
  • Possible duplicate of https://stackoverflow.com/questions/37735108/r-error-onload-failed-in-loadnamespace-for-rjava – zx8754 Jun 20 '18 at 11:02
  • could you append the rJava error message? It's most likely located to this problem. Also try running `java -version` to check if the jdk is installed and not just basic java – mischva11 Jun 20 '18 at 11:11
  • You may have to set LD_LIBRARY_PATH to point to libjvm.so before starting R. – Lars Kotthoff Jun 20 '18 at 15:59

1 Answers1

0

To install FSelector you need this [debian]

sudo apt-get install -y r-cran-randomforest

sudo apt-get install -y default-jre
sudo apt-get install -y default-jdk
sudo R CMD javareconf

skeeper
  • 1
  • 2