0

我正在尝试安装包 RWeka。我安装了 java 版本 8,但我不断收到此错误。有人可以帮忙吗?

> install.packages('RWeka')

There is a binary version available but the source version is later:
  binary source needs_compilation
RWeka 0.4-26 0.4-33             FALSE

installing the source package ‘RWeka’

trying URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-33.tar.gz'
Content type 'application/x-gzip' length 415763 bytes (406 KB)
==================================================
downloaded 406 KB

* installing *source* package ‘RWeka’ ...
** package ‘RWeka’ successfully unpacked and MD5 sums checked
Need at least Java version 1.7/7.0.
ERROR: configuration failed for package ‘RWeka’
* removing ``‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RWeka’
Warning in install.packages :


installation of package ‘RWeka’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/sh/6qsjq6gn0ysf4h1cv9nctzfr0000gn/T/RtmpCVEaSY/downloaded_packages’``
4

2 回答 2

0

根据经验,我认为 Java 和 Java Offline 是有区别的。

尝试从http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html安装 x86/x64 离线版本(一个方便的链接)

于 2017-05-05T15:05:39.297 回答
0

如果您有最新的 Java,只需打开终端并运行

sudo R CMD javareconf

然后在 R 会话中,

install.packages("rJava",type='source')

install.packages("RWeka")

参考:https ://justrocketscience.com/post/install-rweka-mac

于 2017-11-30T03:59:51.530 回答