[R] installing R on Ubuntu

M. Edward (Ed) Borasky zznmeb at gmail.com
Mon Feb 9 17:37:06 CET 2009


On Mon, Feb 9, 2009 at 4:51 AM, Neil Shephard <nshephard at gmail.com> wrote:
>
> The preceived "difficulty" of installing R under whatever flavour of
> GNU/Linux in this thread stems from being unfamiliar with the process of the
> package management of the flavour of GNU/Linux you use (and in part by the
> various distros not having the most recent version of R in their
> repositories.
>
> People who say "why can't it be as easy as dowloading a self-installing
> binary and running that" are trying to fit a round peg (their experience and
> understanding of how applications install in M$-windows) in a square hole
> (or triangular, hexagonal, or whatever depending on the distribution of
> GNU/Linux).

This is true. However, for the most common Linux distros --Debian, Red
Hat Enterprise / CentOS / Scientific Linux / Fedora, openSUSE and
Ubuntu -- you can install the most recent R compiled for your distro
from

http://<your-nearest-CRAN-mirror>/bin/linux/

In addition, most of the distros have third-party repositories where
you can find the latest version of R. In short, if you have an x86 or
x86_64/amd64 system running almost any Linux, you can find a
pre-compiled R. R is a popular package, and it's pretty easy to find
even for Power PC or some of the obscure architectures.

>
> There are pro's and con's to each of the GNU/Linux flavours and its really a
> matter of deciding which you like/have invested time in learning.
>
> Irrespective its still simple to install R from source under GNU/Linux...
>
> 1) Download source tar-ball
> 2) Extract and cd to the directory
> 3) ./configure --prefix=/where/you/want/R/to/go (optionally setting the
> install path at this stage)
> 4) ./make
> 5) ./make install
>
> ...all documented in the FAQ at
> http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-R-be-installed-_0028Unix_0029

Many Linux distros do *not* install the development tools by default,
and which ones live in which packages varies by distro. Fedora in
particular is extremely stripped when you install from the LiveCD. You
have to install gcc, make and a couple of other things just to install
VMware Tools, for example, when running Fedora as a VMware guest. For
building R from source and installing R packages, you'll also need to
install gfortran. And many libraries with external dependencies, like
Rgraphviz, will require not only the package itself (graphviz) but
also the C headers, which may have the name "graphviz-devel" on some
distros and some other name on other distros.
>
> This might not be as clean as using the native package management, but does
> mean that you'll have the latest version installed.
>
> Neil
>
> (Addendum - I've tried several different distros, starting with RedHat 7.3,
> then various versions of Slackware 8 through to 9 before settling on Gentoo,
> all were easy to install R in).

I just recently switched from Gentoo to openSUSE. Gentoo usually had
the latest R source in their repository within a day or so of it
coming out of the R Project release cycle. To get it, all you needed
to do was put the package name in the "/etc/portage/package-keywords"
file. And Gentoo, since it is almost all compiled from source, by
nature *does* have all the development tools installed and installs
all the headers when it installs packages.

-- 
M. Edward (Ed) Borasky

I've never met a happy clam. In fact, most of them were pretty steamed.




More information about the R-help mailing list