在ubuntu 20.04中安装R

时间:2020-08-31 06:56:47

标签: r ubuntu installation

我正在尝试在ubuntu 20.04中重新安装R 当我使用

 sudo apt-get update 

我收到以下错误

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.

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

您没有指定正在运行的Ubuntu版本,但是this guide可能会有用。

简而言之,请先安装运输工具 “ sudo apt安装apt-transport-https软件属性-通用”

然后将其密钥添加到您的apt-repository

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/'

然后,您可以照常使用{p>

r-base

检查您是否已使用sudo apt update sudo apt install r-base 正确安装了R