RStudio does not start when using a R version built from source

[This article was first published on NumberTheory » R stuff, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Because I do not have root privileges on some of the machines I use, I build part of my software from source and install it into my own homedirectory. Doing that requires one to download R from CRAN, e.g. R 2.14.1. Compiling R now is a matter of running:

tar -xzvf R-2.14.1.tar.gz
./configure --prefix=/home/usrname/local_software
make; make install

I recently had to upgrade R, thus forcing me to repeat this process. I had been using RStudio already for a while, therefore I was very surprised to see that it failed to start. RStudio could not find R, and thus failed to start. Before re-compiling R all was fine. It turned out that the problem was related to the shared library of R. By default, the R shared library is not built. RStudio needs it, and thus my RStudio was crashing. To solve this, you need to adapt building R a little bit:

tar -xzvf R-2.14.1.tar.gz
./configure --prefix=/home/usrname/local_software --enable-R-shlib
make; make install

Adding the extra configuration flag causes the R shared library to be built, fixing the problem with RStudio.

To leave a comment for the author, please follow the link and comment on their blog: NumberTheory » R stuff.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)