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
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.I think that I did follow your steps. I "cleaned" my system to the best of my abilities (as previously described; see below) and then did
This seemed (as I previously said on the Ubuntu Mate Community list, from which you told me to switch the discussion to this location) to run without complaint, but produced no executable.
I tried
just now, following your example, and got no output whatever. So it would seem that "dpkg" thinks that r-base has not been installed.
But the output from "sudo apt-get install r-base" seems to say that it has been installed. What is going on?
Added: I have solved the problem. Elsewhere it was suggested to me that I try doing
dpkg -l r-base-core
This produced the enlightening output:
The nature of the message prompted me to try
which ran and said that it was removing a whole lot of stuff.
I then tried
which ran and gave a whole lot more output than was previously produced when I ran "sudo apt-get install r-base". (Note: I had been typing r-base and NOT r-base-core.) It indicated that it was doing lots of stuff that looked promising in respect of actually installing R.
And in fact the promise was fulfilled. I then started R and got:
Ta-da!!!
The problem may have been that previously I had been saying
"sudo apt-get install r-base" rather than
"sudo apt-get install r-base-core".
It is possible that the latter is needed if R has previously been installed from source, but otherwise just "r-base" is sufficient. I am not sufficiently knowledgeable to say. Others may be able to provide insight.