Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install R in linux/Unix without having root privilage?

Tags:

linux

r

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

like image 522
Kryo Avatar asked Jul 13 '15 16:07

Kryo


People also ask

How do I install R without admin rights?

The easiest way that I have found to install R and RStudio under Windows, when you don't have admin privileges, is to create a new folder named “R” under your user: C:/Users/<username>/R/ . You may choose another location, but it must not be synced to network storage, and you must have administrative privileges.

Can we install R in Linux?

Step 1: Open terminal (Ctrl+Alt+T) in Ubuntu. Step 2: Update the package's cache. Step 3: Install R environment. Step 4: Check R installation by using the following command.

Can I install RStudio without installing R?

RStudio requires an installation of R 3.0. 1 or higher. You can download the most recent version of R for your environment from CRAN.


1 Answers

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

like image 51
anilbey Avatar answered Oct 17 '22 08:10

anilbey