gpt4 book ai didi

在 Mac 上安装 RWeka

转载 作者:行者123 更新时间:2023-12-01 07:09:44 26 4
gpt4 key购买 nike

我正在尝试在 mac 上安装 RWeka 包。

操作系统版本:

10.9.5



安装的Java版本:

java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)



执行后

install.packages("RWeka")



当我尝试执行

library(RWeka)



显示以下错误

Error : .onLoad failed in loadNamespace() for 'RWekajars', details:
call: .jinit()
error: JNI_GetCreatedJavaVMs returned -1

Error: package or namespace load failed for ‘RWeka’
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.



命令的输出

R CMD javareconf





xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Java interpreter : /usr/bin/java
Java version : 1.7.0_75
Java home path : /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Non-system Java on OS X

trying to compile and link a JNI program
detected JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
detected JNI linker flags : -L/Users/amlanroy/Library/Java/Extensions -L/Library/Java/Extensions -L/Network/Library/Java/Extensions -L/System/Library/Java/Extensions -L/usr/lib/java -L. -ljvm
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Unable to compile a JNI program

JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre
Java library path:
JNI cpp flags :
JNI linker flags :
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.



请让我知道是否有人遇到过同样的问题并知道解决方案。

最佳答案

  • sudo R CMD javareconf
  • install.packages("rJava",type='source')

  • rJava 包将解决这些错误。

    引用这些来自 thisthis .

    关于在 Mac 上安装 RWeka,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35230081/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com