I want to be able to install the latest stable R release for Ubuntu 18.04, I had the ubuntu version installed and so I removed it and then followed several guides like in this link.
No matter what I do I get the following output when I issue a sudo apt-get install r-base
:
sudo apt install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 3.6.1-3disco) but it is not going to be installed
Depends: r-recommended (= 3.6.1-3disco) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
What's wrong?
(I did all the apt update
etc.)
Best Answer
For anyone that experiences the same problem, I found the solution in: Unable to install R 3.5.0 in Ubuntu Bionic Beaver (18.04)
I simply issued these commands in order and then was able to install:
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
from/etc/apt/sources.list
sudo apt-get autoremove sudo apt-get update sudo apt-get upgrade
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
to/etc/apt/sources.list
sudo apt-get update
sudo apt-get install r-base
And that was it (installed R 3.6.1).