当我inputrequire(xlsx)来加载R中的软件包xlsx时,会显示以下消息: > require(xlsx) Loading required package: xlsx Loading required package: xlsxjars Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Failed with error: 'package 'rJava' could not be loaded' 我也尝试手动加载rJava包,但得到这个错误消息: require(rJava) Loading required package: rJava Error : .onLoad failed in […]
我无法在R 3.0调用rJava包。 我收到以下消息 Error: package 'rJava' was built before R 3.0.0: please re-install it 当我尝试重新安装rJava软件包时出现错误。 我已经提供了R CMD javareconf的输出 Java interpreter : /usr/bin/java Java version : 1.7.0_21 Java home path : /usr/lib/jvm/java-7-openjdk-i386/jre Java compiler : /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/javac Java headers gen.: /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/javah Java archive tool: /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/jar trying to compile and link a JNI progam detected JNI cpp flags […]
使用install.packages("rJava")命令安装rJava时,出现以下错误: 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-sun-1.6.0.20/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../include/linux' java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64/server -L/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64 -L/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/amd64 -L -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib -ljvm' checking whether JNI programs can be compiled… yes checking JNI data types… configure: error: One or more JNI […]
我正在试图在Win 7 64位电脑上安装rJava 。 当我跑步 install.packages("rJava") 一切似乎都很好: Installing package(s) into 'C:/Users/djq/Documents/R/win-library/2.13' (as 'lib' is unspecified) trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/2.13/rJava_0.9-1.zip' Content type 'application/zip' length 654936 bytes (639 Kb) opened URL downloaded 639 Kb package 'rJava' successfully unpacked and MD5 sums checked The downloaded packages are in C:\TEMP\RtmpW2eAUw\downloaded_packages 但是当我试图加载库library(rJava)我得到以下错误: Error : .onLoad failed in loadNamespace() for 'rJava', details: […]
我最近从OSX Mountain Lion升级到优胜美地,从3.1.3升级到3.2。 升级完成后立即打开R或RStudio,弹出消息说我需要安装Java 6.另外,加载rJava或任何依赖rJava的软件包(例如xlsx )会导致RStudio崩溃(R当我尝试通过直接打开R.app时也崩溃了)。 在堆栈溢出和其他地方(更多细节见下文)发现一些修复后,我在加载rJava或任何依赖rJava包不再导致R崩溃,但导致以下错误的一点: library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, …) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/libs/rJava.so Reason: image not found Error: package or namespace load failed for 'rJava' 但是,如果我从命令行调用R,然后加载rJava或任何依赖rJava包,它似乎工作(或至少我没有得到任何错误信息)。 我已经尝试了一些不同的尝试修复,其中一些修复了几次,并且不能完全记得我按照什么顺序做了什么(没有意识到这将是一个恶作剧,并没有真正跟踪) ,但这是它的要点: 将以下内容添加到我的.bash_profile […]