My system: Ubuntu 18.04.4
Rscript --version
R scripting front-end version 3.4.4 (2018-03-15)
My problem: Unsuccessful in upgrading R.
Steps:
sudo apt-get remove r-base r-base-dev
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 E298A3A825C0D65DFD57CBB651716619E084DAB9 (as instructed here: https://cran.r-project.org/bin/linux/ubuntu/)
sudo apt update
sudo apt install r-base r-base-core r-recommended
Output:
The following packages have unmet dependencies.
r-base-core : Depends: libreadline6 (>= 6.0) but it is not installable
When trying to install libreadline6 I get:
sudo apt install libreadline6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libreadline6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libreadline6' has no installation candidate
A search with man libreadline6 shows you need to install libreadline-dev as libreadline6 in Bionic (18.04) is a virtual package.
It turns out libreadline6 is not available on Ubuntu Bionic (18.04) So I had to get it from Ubuntu Xenial (16.04)
For that I went here: https://pkgs.org/search/?q=libreadline6 You get a list of options for libreadline6 for various architectures: amd64, i386, etc.
To find out which is your architecture, run the command:
In my case, because this command returned x86_64, I went for: libreadline6_6.3-8ubuntu2_amd64.deb
Once you click on the link, it takes you to another page. Search there for "Binary Package" in that page. It will display a link to a a deb package. Choose Open with "Software install (default)" and the libreadline6 package will be installed.
I finally have: R scripting front-end version 3.6.3 (2020-02-29)