I just installed Ubuntu 18.04 on my testbed laptop. Total fresh install (chose the 'minimal' option). The first two things I did were install R 3.5
and R Studio 1.1.453
. If I open up a fresh install of R and just let it sit idle for 30 minutes or so I eventually get the error "Error: Unable to establish connection with R session"
.
At this point in time I can't do anything in R Studio
and I have to xkill
it and reload everything to continue programming. An internet search reveals that this issue has been popping up repeatedly since people have been installing R/R Studio
on Ubuntu machines that use GNOME. Am not sure if GNOME is the root cause but it's interesting.
Anybody solved this? Or maybe you run R 3.5 fine on Ubuntu 18.04 without issue. Please let me know. I can only run for 30 minutes or so before this issue brings my system down. And my system is a fresh install of Bionic Beaver with just R on it. Weird.
—— and for those wondering ——
installation for R was via
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base r-base-dev
and R Studio was installed via this link through the Ubuntu software center
https://download1.rstudio.org/rstudio-xenial-1.1.453-amd64.deb
and it is speculated that the preview release of R Studio may fix this (TBD)
https://s3.amazonaws.com/rstudio-ide-build/desktop/trusty/amd64/rstudio-1.2.792-amd64.deb
Best Answer
Currently CRAN mirror provides R 3.6 by default.
To get R 3.5 on Ubuntu 18.04 LTS we need to add CRAN repository with:
and then adjust APT to the highest priority of R 3.5.x versions for the CRAN repository with long single command:
Then install R 3.5 with the command below:
And finally check that R version is 3.5:
Notes:
r-base
andr-base-dev
(and their dependencies).sudo rm /etc/apt/preferences.d/pin-r35
and runsudo apt-get dist-upgrade
to get the newest dependencies.