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

January 25, 2012

(This article was first published on NumberTheory » R stuff, and kindly contributed to R-bloggers)

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. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , ,

Comments are closed.

Search R-bloggers


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)