R: rJava package install failing

后端 未结 17 1035
Happy的楠姐
Happy的楠姐 2020-11-22 16:28

When installing rJava using the install.packages(\"rJava\") command I get the following error:

checking Java support in R... present:
interprete         


        
相关标签:
17条回答
  • 2020-11-22 16:51

    Thanks - your suggestion about $JAVA_HOME lead me to a similar solution:

    prompt$ unset JAVA_HOME
    

    before invoking R.

    0 讨论(0)
  • 2020-11-22 16:56

    Wouldn't

    apt-get install r-cran-rjava
    

    have been easier? You could have asked me at useR! :)

    0 讨论(0)
  • 2020-11-22 16:56

    I came across the same issue, and it worked after running commands below.

    export JAVA_LIBS="$JAVA_LIBS -ldl"
    R CMD javareconf
    

    See details at http://www-01.ibm.com/support/knowledgecenter/SSPT3X_3.0.0/com.ibm.swg.im.infosphere.biginsights.install.doc/doc/install_install_r.html

    0 讨论(0)
  • 2020-11-22 17:00

    I got it working by downloading : https://cran.r-project.org/src/contrib/rJava_0.9-8.tar.gz and running command R CMD install rJava_0.9-8.tar.gz

    0 讨论(0)
  • 2020-11-22 17:01

    I've encountered similar problem on Ubuntu 16.04 and was able to solve it by creating a folder named "default-java" in /usr/lib/jvm and copying into it all the contents of the /usr/lib/jvm/java-8-oracle. I opted for this solution as correcting JAVA_HOME environment variable turned out to be of no use.

    0 讨论(0)
提交回复
热议问题