Thursday, September 27, 2012

R installation in Linux

        cd  /usr/local/src/
        wget http://linux.softpedia.com/dyn-postdownload.php?p=1182&t=0&i=1

    --> tar -zxvf  R-2.15.tar.gz
   ---> cd R-2.15
   --> ./configure --prefix=/usr/local/R-2.15 --enable-R-shlib
    --> make
    --> make install
    --> Add R path in the bash profile.


  --> open this file /etc/ld.so.conf.d/R-i386.conf and put the following entry /usr/local/R-2.15/lib/R/lib then save and exit.
  --> run the ldconfig command.

It should work fine.

Install for 64 bit architechture.

Download from source, untar
./configure

 Neither an F77 compiler nor f2c found error

If you receive the above error follow the below steps

Yum install gcc*  will fix the issue.


R is now configured for x86_64-unknown-linux-gnu

  Source directory:          .
  Installation directory:    /usr/local/R-2.15

  C compiler:                gcc -std=gnu99  -g -O2
  Fortran 77 compiler:       gfortran  -g -O2

  C++ compiler:              g++  -g -O2
  Fortran 90/95 compiler:    gfortran -g -O2
  Obj-C compiler:            gcc -g -O2

  Interfaces supported:      X11, tcltk
  External libraries:        readline
  Additional capabilities:   PNG, JPEG, iconv, MBCS, NLS
  Options enabled:           shared R library, shared BLAS, R profiling

  Recommended packages:      yes

configure: WARNING: you cannot build DVI versions of the R manuals
configure: WARNING: you cannot build info or HTML versions of the R manuals
configure: WARNING: you cannot build PDF versions of the R manuals


make ; make install

configure: error: --with-x=yes (default) and X11 headers/libs are not available

If you receive the above error , follow the below steps

./configure --prefix=/usr/local/R-2.15 --enable-R-shlib  --with-x=no

export PATH=$PATH:/usr/local/R-2.15/bin

ln /usr/local/R-2.15/lib64/R/lib /usr/local/lib64

export  R path in bash profile

No comments: