尝试使用此代码在我的 14.10 ubuntu 上的 R 上安装 rJava 包
if (!require(rJava)) install.packages('rJava')
Run Code Online (Sandbox Code Playgroud)
在重新安装 jdk 后,遇到了一些与 java 相关的错误,包括 jni 问题,并尝试再次运行相同的代码,得到了那个错误
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/local/lib/R/site-library/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 ‘/usr/local/lib/R/site-library/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in …Run Code Online (Sandbox Code Playgroud)