6
votes

I am trying to install R in our cluster(OS of cluster is Red Hat Enterprise Linux 6), where I do not have root access. I tried:

$wget http://cran.rstudio.com/src/base/R-3/R-3.1.1.tar.gz
$ tar xvf R-3.1.1.tar.gz
$ cd R-3.1.1
$ ./configure --prefix=/home/Kryo/R-3.1.1

But getting error:

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

1
Do you have X11 forwarding enabled? Maybe try ./configure --prefix=/home/Kryo/R-3.1.1 --with-x=nomaccruiskeen
@choff, i tried ./configure --prefix=/home/Rajith.Bhaskaran/Tools/R-3.1.1 --without-xKryo
And you still get the same error? I'm not sure how to proceed then. Maybe try with the option --with-readline=no as well. I read elsewhere that you might need libXt-devel too.maccruiskeen
@choff, when i tried to run ./configure --prefix=/home/Kryo/R-3.1.1 --with-x=no. im getting error. But when i tried ./configure --prefix=/home/Kryo/R-3.1.1 --with-x it worked. R is now configured for x86_64-unknown-linux-gnu Source directory: . Installation directory: /home/Kryo/Tools/R-3.1.1. Now when i tried R in terminal im getting -bash: R: command not found.Kryo
You still need to install it. In the R-3.1.1 directory type make and then make install. Then you will need to add R to your path to be able to start it from the command line.maccruiskeen

1 Answers

6
votes

An alternative is to install r-base from conda. One does not need the root privilege for doing it. The root privilege is not needed for installing anaconda/miniconda, neither.

Installing r-base through conda:

conda install -c r r-base

Once R is installed, you can install R packages as usual and conda will detect them and list them on the environment.
One disadvantage of installing R from conda is that the R version available at conda might not always be the latest version of R.
Link to the corresponding conda package: https://anaconda.org/r/r-base