rJava fails to install (MacOS, Red Hat)

后端 未结 2 1787
你的背包
你的背包 2021-02-06 13:06

I am experiencing the same rJava problem that many other people seem to of had at one point or another. The error occurs when R CMD INSTALL tests whether JNI progra

相关标签:
2条回答
  • 2021-02-06 13:45

    I had a recent variation on this same problem with RHEL 6.5. I reviewed this thread and many others. The ptoblem was that the dynamic load modules were not found when testing the complile of the JNI programs. My fix was to insert "CPPFLAGS=${CPPFLAGS-'-ldl'}" into file

    /usr/lib64/R/etc/Renviron
    
    0 讨论(0)
  • 2021-02-06 13:55

    I am using Redhat Linux 7.1

    I was getting the same problem as above and I performed the following steps

    1) Edit /usr/lib64/R/etc/Renviron and add "CPPFLAGS=${CPPFLAGS-'-ldl'}" to the end of the file

    2) Then find the java home and set it like below ( set java home till /jre)

    $export JAVA_HOME=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1.x86_64/jre
    $export PATH=$PATH:$JAVA_HOME/bin
    $R CMD javareconf
    

    3) invoke R from commandline

    $R
    > install.packages("rJava")
    > install.packages("RJDBC",dep=TRUE)
    > q()
    Save workspace image? [y/n/c]: y
    
    0 讨论(0)
提交回复
热议问题