R: rJava package install failing

后端 未结 17 1211
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:48

    below is one of my answers on another post - error: unable to load installed packages just now
    (this is also relevant to this question)

    For Linux(Ubuntu) users: If you have oracle-java (7/8) installed. It'll be at this location /usr/lib/jvm and sudo access is required.

    Create the file /etc/ld.so.conf.d/java.conf with the following entries:

    /usr/lib/jvm/java-8-oracle/jre/lib/amd64
    /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server
    

    (Replace java-8-oracle with java-7-oracle depending on your java version)

    Then:

    sudo ldconfig
    

    Restart RStudio and then install the rJava package.

提交回复
热议问题