Skip to content
Laurent Gatto edited this page Jun 14, 2013 · 8 revisions

Binary installation

The authoritative source is R Installation and Administration manual.

R installation is straightforward. Binaries are available for the respective operating systems. Several GNU/Linux systems provide packages for R and its packages; it is even possible to add specific CRAN apt sources for debian and ubuntu.

Installing from source

On a debian-based system, the following will install all dependencies:

sudo apt-get install \
  build-essential gfortran f2c libpng12-dev libjpeg62-dev \
  liblapack-dev libblas-dev libatlas-base-dev libreadline6-dev \
  libx11-dev texinfo texlive texlive-latex-extra \
  tcl8.5-dev tk8.5-dev libcairo2-dev libxt-dev libxt6 ttf-inconsolata

(Note that some of these might not be strictly needed)

The latest sources can be downloaded from ftp://ftp.stat.math.ethz.ch/Software/R. To automate installation, one could

## getting the latest R-devel src
rtgz=R-patched.tar.bz2
rsrc=R-patched
rm -f $rtgz
wget ftp://ftp.stat.math.ethz.ch/Software/R/$rtgz
rm -rf $rsrc

## installation
tar xjf $rtgz
cd $rsrc

Then, the following configure and make command will install R in the default location, i.e /usr/local/bin, /usr/local/lib, ... which can be changes with ./configure --prefix=/path/to/R/.

./configure --with-jpeglib --with-libpng --with-lapack --with-blas --with-tcltk --with-recommended-packages --enable-R-profiling --enable-memory-profiling --with-cairo  --enable-R-shlib  --enable-R-static-lib
make
make check-devel
make dvi pdf info
sudo make install
sudo make install-dvi install-pdf install-info

More details can be found with ./configure --help and the R Installation and Administration manual.

For windows, see the the Windows toolset page and Rtools pages for details.