All attempts to upgrade R to 3.5.0 on Linux Mint 18.3 didn't work as (perhaps) there was not this version in the CRAN repository and mirrors, I downloaded and installed 3.5.0 in a directory, and pointed RStudio to it via adding the line export RSTUDIO_WHICH_R=/usr/bin/R in ~/.profile, as advised in https://support.rstudio.com/hc/en-us/articles/200486138-Changing-R-versions-for-RStudio-desktop.
However, RStudio wouldn't use it, complaining:
R Not Found
R shared library (/usr/local/lib/R/lib/libR.so) not found. If this is a custom build of R, was it built with the --enable-R-shlib option?
I did everything as advertised but it wouldn’t change the R version — until today! perhaps something got stuck in a cache? Now RStudio is opening with 3.5.0. I swear these damn machines wait until help arrives, then correct themselves and pretend nothing was wrong. It’s crazy-making…. They only do it to annoy, and because they know it teases….
Oops! I have to take back that last message. I’m working on two OS and got them confused. R updated to 3.5.0 on my iMac running OS X 10.11.6 and RStudio recognises and uses it on that machine, but not on my Linux laptop running Mint 18.3 — the latter is the problem.
My apologies! I have a lot of things on the go right now.
I downloaded 3.5.0 for Linux Ubuntu (Mint 18 is based on 16.04) and opened it into a directory in /home, then compiled it from that using the enable-R-shlib option. It installed into /usr/local/bin, so I added the export RSTUDIO_WHICH_R=/usr/local/bin/R line to ~/.profile as indicated in https://support.rstudio.com/hc/en-us/articles/200486138-Changing-R-versions-for-RStudio-desktop.
However, Although RStudio can be invoked both from the Applications Menu and the command line, neither will use R 3.5.0 but opens with R 3.4.4.
Sys.getenv("RSTUDIO_WHICH_R") returns /usr/bin/R, which is the location of 3.4.4, so I presume this is overriding the setting in ~.profile.
Note that RStudio doesn't read the ~/.profile, so setting RSTUDIO_WHICH_R within there won't help -- typically, you'll have to set this in an application launcher definition. I know GNOME has the notion of desktop entries; e.g.
I have exactly the same problem. The CRAN ubuntu/xenial repositories don't yet have the R files for 3.5.0. (Why? It has been several weeks since R 3.5.0 was released.) So I downloaded R-3.5.0.tar.gz from the CRAN/debian site. I was unable to install this using the Ubuntu software manager. (It kept wanting to reinstall 3.4.4). So I installed from source, using the INSTALL instructions (incluing the --enable-R-shlib option) after unzipping the tar file. The install went without problems (compile and install), and I can run R 3.5.0 from the command line. But RStudio can't find a needed file (/usr/local/lib/R/lib/libR.so), so I can't run R from RStudio. Exactly as stuzog found, libRblas.so and libRlapack.so are there, but not libR.so. So I'm stuck.
If anyone can tell me what I have to do to fix this, I'd appreciate learning how to fix this problem.