6

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?

amc
  • 7,142
Christian
  • 221
  • Import the r repositroy gpg key. This section covers how to import the key - https://help.ubuntu.com/community/Repositories/Ubuntu#Authentication_Tab the r project should have a link to the key. – Panther Jan 26 '12 at 18:23
  • @bodhi.zazen Would you consider adding that as an answer rather than a comment? – coversnail May 04 '12 at 19:16
  • @coversnail added a better answer. – Panther May 05 '12 at 04:40

2 Answers2

13

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

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

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

wjandrea
  • 14,236
  • 4
  • 48
  • 98
Panther
  • 102,067
  • There is still a problem: W: Failed to fetch http://r.meteo.uni.wroc.pl/bin/linux/ubuntu/dists/oneiric/main/binary-i386/Packages 404 Not Found even with the line deb http://r.meteo.uni.wroc.pl/bin/linux/ubuntu oneiric universe in /etc/apt/sources.list. Tried other mirrors too (and apt-get update of course). Ubuntu 11.10 – Marcos Jun 19 '12 at 12:08
  • Try another mirror http://cran.r-project.org/mirrors.html – Panther Jun 20 '12 at 15:13
1

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()

Danny
  • 431