error: unable to load installed packages just now

前端 未结 11 1981
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 21:17

When I tried to run the R console in Eclipse, I got this error:

....Please make sure that R package \'rj\' (1.1 or compatible) is installed...
11条回答
  •  臣服心动
    2020-11-30 22:04

    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.

    OR

    Also an alternative method is to export LD_LIBRARY_PATH with the value of Java library path obtained from the command R CMD javareconf -e and run install.packages

提交回复
热议问题