Issues installing RWeka

Joshua Peterson picture Joshua Peterson · Nov 22, 2016 · Viewed 8k times · Source

All,

I'm having some issues installing RWeka. I am on IOS 10.12.1.

This error message is appearing:

installing the source package ‘RWeka’

trying URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-29.tar.gz'

Content type 'application/x-gzip' length 408921 bytes (399 KB)

==================================================

downloaded 399 KB

  • installing source package ‘RWeka’ ...

** package ‘RWeka’ successfully unpacked and MD5 sums checked

** R

** inst

** preparing package for lazy loading

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.

Error : .onLoad failed in loadNamespace() for 'RWekajars', details:

call: .jinit()

error: JNI_GetCreatedJavaVMs returned -1

ERROR: lazy loading 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

I've done the following to try to remedy the issue:

  1. Re-installed rJava
  2. Updated to Java; jre - 8u111 (64bit)
  3. Downloaded the Java Developer Kit; jdk - 8u112 (64bit)
  4. Updated R to 3.3.2
  5. And tried this is Terminal; sudo R CMD javareconf... sudo R install.packages("RWeka")
  6. And restarted RStudio and did a restart of my iMac

Answer

Hatem picture Hatem · Dec 30, 2016

Run this first

$ sudo R CMD javareconf

Then install rJava should work

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

You can then install

install.packages("RWeka")

Hope this help.