如何在 Raspbian GNU/Linux 10 (buster) 上安装 R 4.0.*?

如何在 Raspbian GNU/Linux 10 (buster) 上安装 R 4.0.*?

我相信我已遵循相关指示克兰网站将 R 更新到最新版本(当前为 R 4.0.5),但没有成功。

我在跑

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"

带R版本

$ R --version
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"

我所做的是,第一的将存储库添加到/etc/apt/sources.list

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

目前看起来像这样:

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://cloud.r-project.org/bin/linux/debian buster-cran40/

第二,获取并导入当前签名密钥:

$ sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'

第三,

$ sudo apt update
$ sudo apt upgrade

现在我尝试安装,但失败了。

$ sudo apt-get install r-base r-base-dev
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.0.5-1~bustercran.0) but 3.5.2-1 is to be installed
          Depends: r-recommended (= 4.0.5-1~bustercran.0) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed
 r-base-dev : Depends: r-base-core (>= 4.0.5-1~bustercran.0) but 3.5.2-1 is to be installed
E: Unable to correct problems, you have held broken packages.

为了解决这个问题,我尝试了几种方法,例如修复依赖关系问题,

$ sudo apt-get autoremove

重新安装r-base-core

$ sudo apt update 
$ sudo apt remove r-base-core
$ sudo apt install r-base-core

并使用命令在上面提到的 CRAN 站点。

$ sudo apt install -t buster-cran40 r-base

但我仍然有 R 版本 3.5.2,即我总是得到 R 3.5.2 而不是 R 4.0.5。

如何将 R 4.0.5 安装到我的 Raspberry pi 上?


编辑

更多信息:

$ apt search r-base-core
Sorting... Done
Full Text Search... Done
pandoc/stable 2.2.1-3+b2 armhf
  general markup converter

r-base/buster-cran40 4.0.5-1~bustercran.0 all
  GNU R statistical computation and graphics system

r-base-core/stable,now 3.5.2-1 armhf [installed]
  GNU R core of statistical computation and graphics system

r-base-core-dbg/stable 3.5.2-1 armhf
  GNU R debug symbols for statistical comp. language and environment

r-cran-date/stable 1.2.38-1+b1 armhf
  GNU R package for date handling

答案1

尝试将破坏者升级为靶心。 r-base-core >4 可用。我成功安装了

相关内容