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?
Solution 1:
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 <[email protected]>
with key ID E084DAB9. You can fetch this key withgpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
and then feed it to
apt-key
withgpg -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
Solution 2:
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()