当我试图在eclipse中运行r console时,出现了这个错误:
....Please make sure that R package 'rj' (1.1 or compatible) is installed...
所以我试着像这样在R控制台中安装:
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.1")
得到了这个错误:
checking whether Java interpreter works... checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.configure: error: ./configure failed for jri ERROR: configuration failed for package ‘rj’
顺便说一句,我的配置是:ubntu 11.10 64bit + eclipse 3.7,我已经按照这个帖子:http://www.twm-kd.com/linux/install-oracle-java-sdk-in-ubuntu-11-10/安装oracle-1.7.0-jdk,然后运行:“sudo R CMD javareconf”,得到:
Java interpreter : /usr/bin/java
Java version : 1.7.0
Java home path : /usr/lib/jvm/java-7-oracle/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path: :/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
JNI linker flags : -L -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib -ljvm
JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
Updating Java configuration in /etc/R
Done.
R version 2.13.1 (2011-07-08)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
答案 0 :(得分:9)
您确实在sudo R CMD javareconf
之前确定install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.1")
了吗?
答案 1 :(得分:0)
删除当前版本2.13,然后安装新版本2.15,这个问题就消失了。