R/RStudio, Yosemite, and Java

前端 未结 3 2027
悲哀的现实
悲哀的现实 2021-02-19 08:26

I upgraded to OSX Yosemite yesterday. When I run library(xlsx) in RStudio, the program crashes and I get the message: \"To open \'RStudio\' you need to

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-19 08:45

    This worked for me: setting two env variables in ~/.profile

    export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
    export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/server
    

    I can install the rJava and xlsx packages in Rstudio as such. Admittedly, though, it took hours of tinkering around (mindlessly) to get it just right.

提交回复
热议问题