I am trying to install R 4.0 on Ubuntu 18.04.4 LTS but I keep getting errors of
> sudo apt install r-base-core
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-core : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1 is to be installed
Depends: libicu66 (>= 66.1-1~) but it is not installable
Depends: libreadline8 (>= 6.0) but it is not installable
Recommends: r-recommended but it is not going to be installed
Recommends: r-base-dev but it is not going to be installed
Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
when trying to install. I have removed and deleted R 3.6.3 and have added
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/
in my /etc/apt/sources.list file. Note that the above requires libc6 (>= 2.29) yet from what I have seen, it is NOT AVAILABLE for 18.04. Does this mean I have to upgrade to 19.04, or 20.04 in order to run R 4.0?
The problem may to be with your /etc/apt/sources.list. Please check whether you have disabled all other repositories for R in there, e.g. it should not contain lines like deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
Question: Is your system otherwise current to 18.04? If so, the upgrade should just work. I wrote a blog post (prior to the release) about testing R 4.0.0 on 18.04 along with a video:
Two more recent (related) posts at http://dirk.eddelbuettel.com/blog/code/r4/ as well.
In short, on a system that is otherwise well (i.e. no other packages forced or conflicts or what have you), one just adds the new repo (shown in slides and video), updates the apt index and upgrades. I have done the same for my 19.10 Ubuntu system in another video.
I am using Ubuntu 18.04, for this there should be a single source
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ in /etc/apt/sources.list
Unfortunately, I added deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ by mistake which I removed to install R 4.0
R is successfully installed now.
I just met the same problems while install R 4.0 on Ubuntu 20.04
here is my solutions.
first I just want install R instead of r-base-core and so on. it didn't work that install all the r-base-core and r-base-dev so on.
read the official document https://cran.r-project.org/bin/linux/ubuntu/#install-r
carefully.
if the problems still exist, try renew /etc/apt/sources.list
use the complete document or cope the backup ones
I have 18.04 and want R 4.x
I had to edit the etc/apt/sources.list to
Then I used
sudo apt update
sudo apt install r-base
and it all worked