rJava installation fails on macOS 10.14

前端 未结 4 1870
天涯浪人
天涯浪人 2020-12-19 20:31

After upgrading to MacOS Mojave (10.14.1), I\'m no longer able to install rJava for R version 3.5.1 with Java version \"1.8.0_102\" installed.

I tried

4条回答
  •  猫巷女王i
    2020-12-19 21:09

    I ran into same issue, when i was trying to install "rJava" in my macOs (Mojave version).

    Below steps i executed to resolve issue.

    R version : 3.6.1

    issue : configure: error: one or more Java tools are missing. *** JDK is incomplete! Please make sure you have a complete JDK. JRE is not sufficient.

    solution : execute below command in your terminal

    1. $ /usr/libexec/java_home -V
        Matching Java Virtual Machines (1):
            1.8.0_162, x86_64:  "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk(your Java version)/Contents/Home
    
    1. $ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home

    2. $ export PATH=$JAVA_HOME/bin:$PATH

    3. $ R CMD javareconf

    4. $ R --quiet -e 'install.packages("rJava", type="source", repos="http://cran.us.r-project.org")'

提交回复
热议问题