installation java_Installation of rJava

I've tried to solve this using the previous questions/answers on SO but without any success. So, here's my problem.

I'm using RStudio on and Ubuntu box (14.04) and I tried to upgrade rJava from sources and in the process I managed to lose it.

I tried to install it again using,

install.packages("rJava")

which returned the following error message,

configure: error: One or more Java configuration variables are not set.

Make sure R is configured with full Java support (including JDK). Run

R CMD javareconf

as root to add Java support to R.

If you don't have root privileges, run

R CMD javareconf -e

to set all Java-related variables and then install rJava.

ERROR: configuration failed for package ‘rJava’

* removing ‘/home/darren/R/x86_64-pc-linux-gnu-library/3.2/rJava’

Warning in install.packages :

installation of package ‘rJava’ had non-zero exit status

So, I went to the terminal and typed,

sudo R CMD javareconf

which also gave the following error,

trying to compile and link a JNI program

detected JNI cpp flags :

detected JNI linker flags : -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o

conftest.c:1:17: fatal error: jni.h: No such file or directory

#include

^

compilation terminated.

make: *** [conftest.o] Error 1

Unable to compile a JNI program

JAVA_HOME : /usr/lib/jvm/default-java

Java library path:

JNI cpp flags :

JNI linker flags :

Updating Java configuration in /usr/lib/R

Done.

I tried to follow these links, one and two but they didn't seem to resolve my issue; there are more links on SO but I'm not sure which one to follow. I've also un-installed and re-installed RStudio via the Ubuntu Software Centre but this didn't make any difference.

Can anyone else help?

In short, I want to be able to use RStudio with rJava again without it destroying any other uses of Java (such as jmol).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值