Building R on Ubuntu

Today morning I wanted to do experiments with RJDBC . To my surprise Ubuntu 12.04 does not have latest version of R
Following are the steps I have followed to build R on Ubuntu.

  • Install the required dependencies.
  • sudo apt-get install gcc g++ gfortran libreadline-dev libx11-dev xorg-dev
    
  • Download the source.
  • svn checkout https://svn.r-project.org/R/trunk/ r-devel
    
  • Sync the required modules.
  • cd r-devel/
    apt-get install rsync
    sudo apt-get install rsync
    ./tools/rsync-recommended
    

    If you are behind firewall, setup RSYNC_PROXY.

  • Configure and Make.
  • JAVA_HOME=<your java home> ./configure --prefix <where you want to install the binaries>
    make
    
  • Install.
  • make install
    
    Advertisements