在 AWS EC2 上的 Focal 20.04 中将 R 4.05 升级到 4.1 时出现问题

在 AWS EC2 上的 Focal 20.04 中将 R 4.05 升级到 4.1 时出现问题

我正在尝试使用 Johannes Ranke 在 cloud-R 上提供的更新说明将 R 4.0.5 升级到 R 4.1,我执行的操作如下;

sudo nano /etc/apt/sources.list

并补充道;

deb http://cloud.r-project.org/bin/linux/debian buster-cran40/

并注释掉;

http://us-east-2.ec2.archive.ubuntu.com/ubuntu/ focal main restricted

然后,

sudo apt update
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:5 http://cloud.r-project.org/bin/linux/debian buster-cran40/ InRelease
Get:6 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal InRelease [18.1 kB]
Get:7 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main amd64 Packages [706 kB]
Get:8 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu 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.

我似乎无法摆脱 4.0.5。如能提供任何帮助,我将不胜感激。

我的 EC2 设置

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

neofetch
            .-/+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 Amazon.com, Inc. Device 1111
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Memory: 521MiB / 31653MiB
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
  +sssssssssdmydMMMMMMMMddddyssssssss+
   /ssssssssssshdmNNNNmyNMMMMhssssss/
    .ossssssssssssssssssdMMMNysssso.
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.

答案1

其实很简单。我只需按照 R 项目网页上的说明操作,R 4.0.5 就会更新到 4.1.0

相关内容