- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Ubuntu 10.04 的 CRAN apt 存储库中使用 R 2.13,并且我正在尝试安装需要 JGR/rJava 的 Deducer,但 rJava 拒绝构建/安装,提示无法构建 JNI 应用程序。我试过 sudo R CMD javareconf
正如所建议的那样,但这只会导致有关未设置配置的不同错误。我找到了 R: rJava package install failing ,所以我尝试了安装 r-cran-rjava
的建议(但那是 0.8 并且 Deducer/JGR 似乎坚持安装 0.9)并摆弄我的 $JAVA_HOME
,都无济于事。有任何想法吗?
以下是更完整的事件记录:
$ sudo aptitude install r-cran-rjava
...
$ R
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages(c('JGR','Deducer'))
Installing package(s) into ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rJava’, ‘JavaGD’, ‘iplots’
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/rJava_0.9-1.tar.gz'
Content type 'application/x-gzip' length 527197 bytes (514 Kb)
opened URL
==================================================
downloaded 514 Kb
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/JavaGD_0.5-4.tar.gz'
Content type 'application/x-gzip' length 102242 bytes (99 Kb)
opened URL
==================================================
downloaded 99 Kb
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/iplots_1.1-4.tar.gz'
Content type 'application/x-gzip' length 330323 bytes (322 Kb)
opened URL
==================================================
downloaded 322 Kb
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/JGR_1.7-7.tar.gz'
Content type 'application/x-gzip' length 536564 bytes (523 Kb)
opened URL
==================================================
downloaded 523 Kb
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/Deducer_0.4-4.tar.gz'
Content type 'application/x-gzip' length 5325794 bytes (5.1 Mb)
opened URL
==================================================
downloaded 5.1 Mb
* installing *source* package ‘rJava’ ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
c hecking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-6-openjdk/jre/../include'
java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm'
checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/rJava’
* installing *source* package ‘JavaGD’ ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for memset... yes
checking for mkdir... yes
checking for rmdir... yes
checking for select... yes
checking for socket... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
cpp flags : '-I/usr/lib/jvm/java-6-openjdk/jre/../include'
java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm'
checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.
ERROR: configuration failed for package ‘JavaGD’
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/JavaGD’
ERROR: dependency ‘rJava’ is not available for package ‘iplots’
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/iplots’
ERROR: dependencies ‘rJava’, ‘JavaGD’, ‘iplots’ are not available for package ‘JGR’
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/JGR’
ERROR: dependencies ‘rJava’, ‘JGR’ are not available for package ‘Deducer’
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/Deducer’
The downloaded packages are in
‘/tmp/RtmpCSITmm/downloaded_packages’
Warning messages:
1: In install.packages(c("JGR", "Deducer")) :
installation of package 'rJava' had non-zero exit status
2: In install.packages(c("JGR", "Deducer")) :
installation of package 'JavaGD' had non-zero exit status
3: In install.packages(c("JGR", "Deducer")) :
installation of package 'iplots' had non-zero exit status
4: In install.packages(c("JGR", "Deducer")) :
installation of package 'JGR' had non-zero exit status
5: In install.packages(c("JGR", "Deducer")) :
installation of package 'Deducer' had non-zero exit status
>
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages('rJava')
Installing package(s) into ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/rJava_0.9-1.tar.gz'
Content type 'application/x-gzip' length 527197 bytes (514 Kb)
opened URL
==================================================
downloaded 514 Kb
* installing *source* package ‘rJava’ ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-6-openjdk/jre/../include'
java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm'
checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/rJava’
The downloaded packages are in
‘/tmp/RtmpTk0ftk/downloaded_packages’
Warning message:
In install.packages("rJava") :
installation of package 'rJava' had non-zero exit status
>
$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.6.0_20
Java home path : /usr/lib/jvm/java-6-openjdk/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm
JNI cpp flags :
Updating Java configuration in /etc/R
Done.
$ R
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages('rJava')
Installing package(s) into ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/rJava_0.9-1.tar.gz'
Content type 'application/x-gzip' length 527197 bytes (514 Kb)
opened URL
==================================================
downloaded 514 Kb
* installing *source* package ‘rJava’ ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
c hecking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : ''
java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm'
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/yang/R/x86_64-pc-linux-gnu-library/2.13/rJava’
The downloaded packages are in
‘/tmp/RtmpsJBxfe/downloaded_packages’
Warning message:
In install.packages("rJava") :
installation of package 'rJava' had non-zero exit status
>
最佳答案
Dah,发布后不久我在这里找到了答案:
http://r-interface.blogspot.com/2012/04/install-r-jgr-and-deducer-in-ubuntu.html
虽然我已经安装了 Sun Java,但关键是运行 update-java-alternatives
在运行 javareconf 之前首先实际切换到 Sun Java:
sudo update-java-alternatives -s java-6-sun
sudo R CMD javareconf
关于r - 无法在 Ubuntu 10.04 上安装 rJava 0.9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7129303/
由于“rJava”的加载问题,我在加载“Deducer”包时遇到问题。 “rJava”的安装似乎正确完成,但在调用它加载时却失败了。 拜托,任何人都可以阐明一些智慧吗? :) 错误:.onLoad 在
这周我有时间使用与 Java 相关的包。我终于让我的 RWeka 工作了(参见 HERE ),但现在我遇到了 rJava 问题。 包似乎加载正常,但当我加载库时,我得到以下信息: Error in g
为什么 rJava 需要安装整个 JDK 而不仅仅是 JRE? (jvm.dll 在 JRE 中可用) 让我们假设 jvm.dll 的路径和所有其他环境变量都已正确设置。 最佳答案 rJava 包不需
在我的 java 类中,我编写了 3 个测试函数,如下所示: public void try2dStringArray(String[][] arr) { System.out.println
我目前正在开发 R 包以在 R 中集成 java 代码。但是,我在尝试正确调用 java 类方法时遇到问题。目前我已经独立开发了一个java程序,编译成class文件,然后打包成jar文件。我的代码示
我无法在 R 上使用 rjava 解决我的问题。 当我安装 rJava 包并需要它时,我没有任何问题。 install.packages("devtools") install.packages("r
我不是 Java 程序员。我编程 R 和 C++。我有一些想要包含在 R 包中的 Java 代码。该程序的基本原理是: 从标准输入读取数据。 运行 MCMC 链。 输出到文件。 我想将它转换为 R,在
使用 install.packages("rJava") 命令安装 rJava 时,出现以下错误: checking Java support in R... present: interpreter
无法在ubuntu中安装rjava包,R版本是3.1。安装jdk i.7。请分享R的java配置的确切路径。我已经尝试过javareconf -e来设置rjava的env。 以下是 rJava 安装后
我一直在玩 rJava 包,但由于 rJava 似乎不了解 Java 泛型类型,因此我很难创建具有泛型类型参数的 java 对象。如果我有一个像这样的 java 类: public class A {
我正在尝试安装 rJava 以在运行 Linux 的 super 计算机的服务器上执行 MaxEnt(Dismo 程序包)。所有其他包都已成功,但 rJava 继续出错。 我遵循了这个 thread
我在 ubuntu 12.4 server 上使用 rstudio与 r 3.1.1 . rJava 安装成功。但无法加载 rjava 库。我正在使用“rstudio”作为用户。 Loading re
我正在使用 xlsx 包创建工作簿、工作表,将数据写入工作表,然后保存工作簿。但是,当我多次重复这组操作时,我开始出现错误消息: >Error in .jcheck(silent = FALSE) :
Rstudio 的编织按钮无法编织包含 rJava 包的 rmarkdown (Rmd) 文件。但是,如果我使用 rmarkdown::render() ,相同的 Rmd 文件渲染成 html 没有问
我一直在努力解决这个问题。当我从 R 安装 rJava 时,它需要 Java 1.6 而不是 1.8。我使用的是 MAC OS 10.8.5,这些是我已经完成的步骤。 我已经安装了 R。 我的机器上有
我正在运行 RSTudio 版本 1.1.442 和 R3.5。当我尝试加载 rJava 时,出现以下错误; library(rJava) Error: package or namespace lo
这个问题困扰了我一个星期了。我已经从运行在 Ubuntu 服务器 14.04 上的 R 安装了 rJAVA。我像这样将 rJava 包安装为源代码: install.packages("rJava",
有没有办法让 rJava 打印出错误的完整堆栈跟踪,而不仅仅是异常?例如,此代码(尝试从 R 调用 Ambit2 化学信息学库) smrkMan >C" ) res .jcall("C",,"mai
我正在使用名为 CDK 的第三方库.我正在尝试使用 rJava 创建类 Bond 的实例: o1 <- .jnew("org.openscience.cdk.Atom","O") o2 <- .jne
我使用 rJava 将 Java 和 R 集成到我的项目中。 我需要在我的应用程序中加载 GWmodel R 包并通过 Java 计算距离矩阵。 这是我加载 GWmodel 并计算距离矩阵的函数: R
我是一名优秀的程序员,十分优秀!