非常感谢您一起来看看。这里有一篇上一篇文章,其中包含相同的错误消息“无法编译简单的JNI程序”,解决方案是更新到R 1.15。但我已经拥有最新版本的所有内容。虽然它显示“请参阅config.log以获取详细信息”,但它没有给出位置,并且终端上的“find / -name config.log”不返回任何内容。
这是一个令人筋疲力尽,令人沮丧的过程,试图让它发挥作用。任何帮助将不胜感激。
R版本2.15.1,64位(我使用Homebrew安装,但它应该不是问题)
Eclipse 4.2 Cocoa,64位(也试过3.7,也没用)
OSX 10.7.5
以下是错误消息:
install.packages(c("rj"), repos="http://download.walware.de/rj-1.1") Installing package(s) into '/Library/Frameworks/R.framework/Versions/2.15/Resources/library' (as 'lib' is unspecified) trying URL 'http://download.walware.de/rj-1.1/src/contrib/rj_1.1.0-4.tar.gz' Content type 'application/x-tar' length 314501 bytes (307 Kb) opened URL ================================================== downloaded 307 Kb * installing *source* package 'rj' ... checking R config... found R_HOME : /usr/local/Cellar/r/2.15.1/R.framework/Resources checking for gcc... cc 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 cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking Java support in R... ok JAVA_HOME: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home JAVA : /usr/bin/java JAVAC : /usr/bin/javac JAVAH : /usr/bin/javah JAVA_CPPFLAGS: -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include JAVA_LIBS: -framework JavaVM JAR : /usr/bin/jar configure: creating ./config.status config.status: creating src/Makevars === configuring in jri (/private/var/folders/7p/q7qb1n2d277c9tqt65s5wy_c0000gn/T/RtmpVlP2YK/R.INSTALL2c9175fac4e/rj/jri) configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=. checking build system type... i386-apple-darwin11.4.2 checking host system type... i386-apple-darwin11.4.2 checking for gcc... cc 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 cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory yes 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' * removing '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rj' * restoring previous '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rj' The downloaded source packages are in '/private/var/folders/7p/q7qb1n2d277c9tqt65s5wy_c0000gn/T/RtmpNM4Pyx/downloaded_packages' Warning message: In install.packages(c("rj"), repos = "http://download.walware.de/rj-1.1") : installation of package 'rj' had non-zero exit status
以下是会话信息。
sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin11.4.0 (64-bit) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tcltk_2.15.1 tools_2.15.1
答案 0 :(得分:0)
我遇到了同样的问题,以下解决方案对我有用。请按照步骤
1。)您需要在终端上运行此命令 - R CMD javareconf 2.)之后检查StatET与rJ包的兼容性,其顺序如下。
对于RJ 2.0(StatET 3.4 - 3.5): install.packages(c(“rj”,“rj.gd”),repos =“http://download.walware.de/rj-2.0”)
对于RJ 1.1(StatET 3.0 - 3.3): install.packages(c(“rj”,“rj.gd”),repos =“http://download.walware.de/rj-1.1”)
对于RJ 1.0(StatET 2.0): install.packages(c(“rj”,“rj.gd”),repos =“http://download.walware.de/rj-1.0”)
对于RJ 0.5(StatET 0.10): install.packages(“rj”,repos =“http://download.walware.de/rj-0.5”)
3.。)根据StatET了解兼容版本后,运行软件包安装命令。 例如。我正在使用StatET 3.5因此对我而言RJ 2.0将起作用,而不是其他人。
所以命令就是 {install.packages(c(“rj”,“rj.gd”),repos =“http://download.walware.de/rj-2.0”)}
4.。)安装完成后,检查环境变量是否设置正确,以防您使用任何IDE(如Eclipse)。库路径应该在Eclipse或任何其他IDE中设置。
如有任何问题,请点击此链接 - http://www.walware.de/?page=/it/statet/installation.html