How to install R on a local machine, the problems faced and troubleshooting
- Download the tarball of R-2.6.2 from http://www.icewalkers.com/Linux/Software/530020/R.html onto your local machine, for eg: ~/dist/R-2.6.2.tar.gzR-2.6.2 is the version currently in use by SSG
- unpack it with
~src>tar xvfz ~/dist/R-2.6.2.tar.gz
- cd to R-2.6.2
- Read the INSTALL text file, the first instruction is to do
./configure
- Will get an error for the above command
configure: error: No F77 compiler found
- R requires Fortran compiler. Our desktop machines do have a Fortran compiler (gcc42-fortran). If your desktop machine does not have it, go to Yast and search for Fortran. Select gcc42-fortran and install
- So we need to change the search variable in R-2.6.2/.configure file to accept the fortran compiler we have. Apply the patch below in order to do this
-
~/src/R-2.6.2>patch --ignore-whitespace --backup ./configure << EOF 6180c6180 < F95_compilers="f95 fort xlf95 ifort ifc efc pgf95 lf95 gfortran ftn g95" --- > F95_compilers="f95 fort xlf95 ifort ifc efc pgf95 lf95 gfortran gcc42-fortran ftn g95" 6192c6192 < 3.*) GCC_Fortran_compiler=g77 ;; --- > 3.*) GCC_Fortran_compiler=gcc42-fortran ;; EOF
- configure with readline=no like this
~/src/R-2.6.2> ./configure --with-readline=no
- Issue the following command make
- link the bin/R so that R can be invoked from anywhere
~/src/R-2.6.2> ln bin/R R