Ubuntu: Installing R on Ubuntu - getting updates to work


I have installed R. However, when I update my system it complains that the R updates aren't authenticated.

What do I have to do to authenticate them?


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

To obtain the latest R packages, add an entry like

deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/  deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu oneiric/  deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu natty/  deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu lucid/  deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu hardy/  

in your /etc/apt/sources.list file, replacing <my.favorite.cran.mirror> by the actual URL of your favorite CRAN mirror. See http://cran.r-project.org/mirrors.html for the list of CRAN mirrors.

Then later in the README

The Ubuntu archives on CRAN are signed with the key of Michael Rutter <marutter@gmail.com> with key ID E084DAB9. You can fetch this key with

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

and then feed it to apt-key with

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

To install the complete R system, use

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

For additional details see




I just added a bunch of entries with sudo vi /etc/apt/sources.list because finding one that works for oneiric is disappointing:

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/  

Then, type sudo apt-get update followed by sudo apt-get install r-base

To get started with R, simply type R at the terminal prompt. Quit with q()

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »