在 Ubuntu 22.04 上安装 R

在 Ubuntu 22.04 上安装 R

我刚刚将我的设备更新到 Ubuntu 22.04,并且我想按照此自述文件安装 R:https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html

一切正常,但是,当我尝试更新我的软件包时出现错误:

~$ sudo apt update

Err:1 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
Get:7 http://apt.insync.io/ubuntu jammy InRelease [5.531 B]
Reading package lists... Done        
W: GPG error: https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

有人知道如何解决这个问题吗?我尝试了自述文件中的所有存储库,结果相同。

答案1

我觉得你错过了你链接的指南中的一个步骤。你需要对密钥进行签名。该链接中的相关行是

wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc

相关内容