在Ubuntu上安装R – 让更新工作

我已经安装了R.但是,当我更新我的系统时,它抱怨R更新未经过身份validation。

我需要做些什么来validation它们?

来自http://cran.r-project.org/bin/linux/ubuntu/README :

要获取最新的R包,请添加一个条目

deb http:///bin/linux/ubuntu precise/ deb http:///bin/linux/ubuntu oneiric/ deb http:///bin/linux/ubuntu natty/ deb http:///bin/linux/ubuntu lucid/ deb http:///bin/linux/ubuntu hardy/ 

/etc/apt/sources.list文件中,将替换为您喜欢的CRAN镜像的实际URL。 有关CRAN镜像的列表,请参见http://cran.r-project.org/mirrors.html 。

然后在README中

CRAN上的Ubuntu档案使用密钥ID E084DAB9以Michael Rutter 的密钥签名。 您可以使用获取此密钥

 gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 

然后将其提供给apt-key

 gpg -a --export E084DAB9 | sudo apt-key add - 

要安装完整的R系统,请使用

 sudo apt-get update sudo apt-get install r-base 

有关其他详情,请参阅

https://help.ubuntu.com/community/Repositories/Ubuntu#Authentication_Tab

https://help.ubuntu.com/community/SecureApt

我刚刚在sudo vi /etc/apt/sources.list添加了一堆条目,因为找到一个适用于oneiric的条目令人失望:

 deb http://streaming.stat.iastate.edu/CRAN/ oneiric/ deb http://cran.cnr.Berkeley.edu oneiric/ deb http://cran.stat.ucla.edu/ oneiric/ deb http://streaming.stat.iastate.edu/CRAN/ oneiric/ deb http://ftp.ussg.iu.edu/CRAN/ oneiric/ deb http://rweb.quant.ku.edu/cran/ oneiric/ deb http://watson.nci.nih.gov/cran_mirror/ oneiric/ deb http://cran.mtu.edu/ oneiric/ deb http://cran.wustl.edu/ oneiric/ deb http://cran.case.edu/ oneiric/ deb http://ftp.osuosl.org/pub/cran/ oneiric/ deb http://lib.stat.cmu.edu/R/CRAN/ oneiric/ deb http://cran.mirrors.hoobly.com oneiric/ deb http://mirrors.nics.utk.edu/cran/ oneiric/ deb http://cran.revolutionanalytics.com oneiric/ deb http://cran.fhcrc.org/ oneiric/ deb http://cran.cs.wwu.edu/ oneiric/ 

然后,键入sudo apt-get update然后输入sudo apt-get install r-base

要开始使用R,只需在终端提示符下键入R 退出q()