Jul 18, 2012

Installing the latest R on Ubuntu

The Ubuntu version and the latest R versions seldom match. Check the version with:

apt-get update
apt-cache policy r-base


The procedure is to get the latest security key for R from the CRAN page. For example, the security key for 2.15 is signed and maintained by: Michael Rutter. The keys don't usually change all that often. But they changed for Ubuntu 12.04.

Import the key into apt-get, update the apt-get sources list and then install R.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo geany /etc/apt/sources.list


In geany, add

deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/


At the terminal:

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

0 Comments:

Post a Comment