Issue upgrading R 4.05 to 4.1 in Focal 20.04 on AWS EC2

ma flag

I am trying to upgrade R 4.0.5 to R 4.1 with an update instruction by Johannes Ranke on cloud-R and I did as follows;

sudo nano /etc/apt/sources.list

and added;

deb buster-cran40/

and commented out; focal main restricted


sudo apt update
Hit:1 focal-updates InRelease
Hit:2 focal InRelease
Get:3 focal-backports InRelease [101 kB]
Get:4 focal-security InRelease [114 kB]
Hit:5 buster-cran40/ InRelease
Get:6 focal InRelease [18.1 kB]
Get:7 focal/main amd64 Packages [706 kB]
Get:8 focal/main Translation-en [838 kB]
Fetched 1777 kB in 2s (926 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
➜  ~ apt list --upgradable
Listing... Done
r-base-core/buster-cran40 4.1.0-1~bustercran.0 amd64 [upgradable from: 4.0.5-1.2004.0]
r-base/buster-cran40 4.1.0-1~bustercran.0 all [upgradable from: 4.0.5-1.2004.0]
r-cran-cluster/buster-cran40 2.1.2-1~bustercran.0 amd64 [upgradable from: 2.1.1-1.2004.0]
r-recommended/buster-cran40 4.1.0-1~bustercran.0 all [upgradable from: 4.0.5-1.2004.0]


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 (>= 4.1.0-1~bustercran.0) but 4.0.5-1.2004.0 is to be installed
          Depends: r-recommended (= 4.1.0-1~bustercran.0) but 4.0.5-1.2004.0 is 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.

I can't seem to get rid of a 4.0.5. Any help will be appreciated.

My EC2 setup

lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal  

            .-/+oossssoo+/-.               ubuntu@ip-172-31-24-104
        `:+ssssssssssssssssss+:`           -----------------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.2 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: z1d.xlarge
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.8.0-1038-aws
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 2 hours, 52 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1664 (dpkg), 5 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: zsh 5.8
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Terminal: /dev/pts/0
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   CPU: Intel Xeon Platinum 8151 (4) @ 4.018GHz
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   GPU: 00:03.0, Inc. Device 1111
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Memory: 521MiB / 31653MiB
ma flag

It was actually pretty simple. I just followed an instruction written on the R project web page and R 4.0.5 is updated to 4.1.0

Alfonso avatar
de flag
could you write what you did or include a link? thnx

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.