I finally decided to install Java for OS X 2014-001 (Java 6), as I seemed to be running out of options. In addition, when I quit RStudio, it would seem to close normally, but then an "RStudio quit unexpectedly" message would pop up, indicating that the program had crashed while trying to close. Installed the latest Java Development Kit and reinstalled rJava from source (can't remember where I found that one).Īt some point while trying all of these, I was able to load rJava without crashing R, but instead got the error message posted above. Options(""="/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre") I tried setting it to the following (per this SO question): Reconfigured java from the command line as follows:Ĭhecked options("") and discovered this was set to NULL.
bash_profile (per this SO answer):Įxport JAVA_HOME="/usr/libexec/java_home -v 1.8"Įxport LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/server I've tried a number of different attempted fixes, some of them a few times, and can't quite remember exactly what I did in what order (didn't realize this would be such a morass and wasn't really keeping track), but here's the gist of it:Īdded the following to my. However, if I invoke R from the command line and then load rJava or any package that depends on rJava, it seems to work (or at least I don't get any error messages). )Įrror: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/libs/rJava.so':ĭlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/libs/rJava.soĮrror: package or namespace load failed for ‘rJava’ onLoad failed in loadNamespace() for 'rJava', details:Ĭall: dyn.load(file, DLLpath = DLLpath. In addition, loading rJava or any package that depends on rJava (e.g., xlsx) caused RStudio to crash (R also crashed when I tried this by opening R.app directly).Īfter trying a few fixes found on Stack Overflow and elsewhere (more details below), I am at a point where loading rJava or any package that depends on rJava no longer causes R to crash, but results in the following error: library(rJava)Įrror. Immediately after the upgrade, when I opened R or RStudio I got a pop-up message saying that I needed to install Java 6.
If you are running Linux, you should know how to install things on your computer.I recently "upgraded" from OSX Mountain Lion to Yosemite and from R 3.1.3 to 3.2.
Once the download completes, open the installer and follow the directions to install R on your computer.
Then click the Download R 4.1.1 for Windows link, which will download the installer for the most current version of R (4.0.2 as of July 24, 2020). If you are unsure which version of the MacOS is running on your computer, select About this Mac from the Apple menu in your toolbar.Ĭlick the link that says Install R for the first time (or click base they go to the same place). Click the appropriate PKG link for R your version of MacOS. You can find these links under the Binaries for legacy OS X systems heading further down the install page. If you are running an older version of MacOS, you will have to install an older version of R. So long as you are running MacOS 10.13 or higher just click the first link for the PKG, which will download the installer for the most current version of R (4.1.1 as of August 16, 2021). This is where the installation directions diverge depending on your OS.
In the Download and Install R box, choose the binary that matches the operating system (OS) for your computer.These should all be the same, but I tend to choose the Iowa State University link under USA. Click the CRAN link under Download on the left-hand side of the page.To install R, navigate your web browser to: