简体   繁体   English

无法在R平台上安装rJava

[英]Unable to install rJava on R platform

I have Ubuntu 10.x OS and I have installed R on it. 我有Ubuntu 10.x操作系统,我已经安装了R。 I want to install rJava on R. For that when I am running installed.packages("rJava) command which is giving error 我想在R上安装rJava。当我运行的是installed.packages(“rJava)命令,它给出了错误

checking whether Java run-time works... Error: Could not find or load main class getsp no configure: error: Java interpreter '/usr/bin/java' does not work ERROR: configuration failed for package 'rJava' * removing '/home/hduser/R/i486-pc-linux-gnu-library/2.10/rJava' 检查Java运行时是否有效...错误:无法找到或加载主类getsp无配置:错误:Java解释器'/ usr / bin / java'不起作用错误:包'rJava'*删除'的配置失败/home/hduser/R/i486-pc-linux-gnu-library/2.10/rJava”

The downloaded packages are in '/tmp/Rtmp0tlBXn/downloaded_packages' Warning message: In install.packages("rJava") : installation of package 'rJava' had non-zero exit status 下载的软件包位于'/ tmp / Rtmp0tlBXn / downloaded_pa​​ckages'警告消息:在install.packages(“rJava”)中:软件包'rJava'的安装具有非零退出状态

If I run system("java -version") 如果我运行system("java -version")

Then it showing same Java version which is given when I run Java -version command from base OS prompt. 然后它显示了当我从基本OS提示符运行Java -version命令时给出的相同Java版本。 So it means no problem with Java which I can see reason in output of install package command? 所以这意味着Java没有问题,我可以在安装包命令的输出中看到原因? As suggested when I use 正如我使用时建议的那样

 sudo apt-get install r-cran-rjava

Here also didnt get any luck Please suggest 这里也没有运气请建议

I just saw that you wrote installe d .packages instead of install.packages, you have to use install.packages("rJava") to install it. 我刚看到您编写了installe d .packages而不是install.packages,您必须使用install.packages(“rJava”)来安装它。

The description of the method you used (installe d .packages) says: Find (or retrieve) details of all packages installed in the specified libraries. 您使用的方法(installe d .packages)的说明说明: 查找(或检索)指定库中安装的所有软件包的详细信息。

Can you please try 你能试试吗

install.packages("rJava")
library(rJava)

and tell me the output? 并告诉我输出? (I'm pretty sure it will already work then). (我很确定它已经可以工作了)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM