希望在这里获得一些帮助。我刚刚安装了R-Studio(版本1.3.1093),并尝试安装一些软件包(例如XLConnect)。我收到一条错误消息,似乎是Java问题(请参见下面的代码,下面的JRE和R版本)。但是由于我不是专家,所以仅阅读错误消息就无法真正找出问题所在。谁能帮我吗?
代码:
> install.packages("XLConnect")
错误消息:
versuche URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/XLConnect_1.0.1.tgz'
Content type 'application/x-gzip' length 22898238 bytes (21.8 MB)
==================================================
downloaded 21.8 MB
The downloaded binary packages are in
/var/folders/jc/vklzwn9d0bn5v_wcqdcnr_880000gn/T//RtmpbfPNaD/downloaded_packages
代码:
> library(XLConnect)
错误消息:
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Fehler: package or namespace load failed for ‘XLConnect’:
.onLoad in loadNamespace() für 'rJava' fehlgeschlagen, Details:
Aufruf: fun(libname, pkgname)
Fehler: JVM could not be found
Zusätzlich: Warnmeldungen:
1: In system("/usr/libexec/java_home", intern = TRUE) :
Ausführung von Kommando '/usr/libexec/java_home' ergab Status 1
2: In fun(libname, pkgname) :
Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)
R版本:
版本 _
平台x86_64-apple-darwin17.0
拱形x86_64
os darwin17.0
系统x86_64,darwin17.0
状态
专业4
次要0.3
2020年
第10个月
第10天
svn版本79318
语言R
version.string R版本4.0.3(2020-10-10) 昵称Bunny-Wunnies Freak Out
JRE版本:
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)