我正在尝试在托管免费版rstudio(DigitalOcean,如果你想知道的话)的ubuntu服务器上运行我的闪亮应用程序,并且由于某种原因我无法安装或打开rJava包。我已尝试过在线的常见解决方案,例如apt-get install r-cran-rjava
,我也做了sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
和sudo R CMD javareconf
,但似乎没有任何效果。当尝试加载rJava时,下面是我在R中的错误消息:
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/shushufang18/R/x86_64-pc-linux-gnu-library/3.4/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
这是我的java版本:
root@shushufang18-fiche:~# java -version
java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)
这是我的R版本:
$platform
[1] "x86_64-pc-linux-gnu"
$arch
[1] "x86_64"
$os
[1] "linux-gnu"
$system
[1] "x86_64, linux-gnu"
$status
[1] ""
$major
[1] "3"
$minor
[1] "4.1"
$year
[1] "2017"
$month
[1] "06"
$day
[1] "30"
$`svn rev`
[1] "72865"
$language
[1] "R"
$version.string
[1] "R version 3.4.1 (2017-06-30)"
$nickname
[1] "Single Candle"
谢谢!!!