在Ubuntu 20.04中安装R

3

我想在Ubuntu 20.04上重新安装R, 当我使用以下命令时:

 sudo apt-get update 

I get the following error

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease    
Hit:3 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease     
Hit:4 https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/ InRelease
Hit:5 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease
Hit:6 https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/ InRelease
Hit:7 https://deb.leap.se/client release InRelease
Ign:8 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran InRelease
Ign:9 https://cloud.r-project.org/bin/linux/ubuntu focal-cran36/ InRelease
Err:10 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran Release
  404  Not Found [IP: 143.204.201.112 443]
Err:11 https://cloud.r-project.org/bin/linux/ubuntu focal-cran36/ Release
  404  Not Found [IP: 143.204.201.112 443]
Err:12 https://repo.windscribe.com/ubuntu bionic InRelease
  Temporary failure resolving 'repo.windscribe.com'
Reading package lists... Done         
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu bionic-cran Release' does not have a Release file.
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.
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu focal-cran36/ Release' does not have a Release file.
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.

有没有人能帮我解决问题?


关于从源代码安装的问题,我在这里发布了一份指南:https://stackoverflow.com/questions/70677307/installing-r-4-1-from-source-on-newly-installed-ubuntu-20-04 - JALO - JusAnotherLivngOrganism
应参考官方的 R 文档,其中也有关于解决密钥真实性的说明:https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html - Vivek Atal
2个回答

4

今天我在keyserv.ubuntu.com发现了一把新的密钥:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95c0faf38db3ccad0c080a7bdc78b2ddeabc47b7.

前一个密钥已过期。

0

您没有指定使用的Ubuntu版本,但是this guide可能会有所帮助。

简而言之,首先安装传输工具 ´sudo apt install apt-transport-https software-properties-common´

然后将其密钥添加到apt存储库中

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

移除其他R的清单,然后代之以此

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

然后您可以像往常一样使用r-base进行安装。

sudo apt update
sudo apt install r-base

请通过 R --version 命令检查您是否已正确安装 R。


1
20.04 是“focal”,不是“bionic”。 - GWD

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接