我正在尝试安装包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’``
答案 0 :(得分:0)
根据经验,我认为Java和Java Offline之间存在差异。
尝试从http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html安装x86 / x64离线版本(一个方便的链接以保持住)
答案 1 :(得分:0)
如果你有最新的Java,只需打开一个终端并运行
sudo R CMD javareconf
然后在R会话中,
install.packages(“rJava”,type ='source')
install.packages( “RWeka”)