How to set up R to run from a directory with no bin or root access?












0















I need to run the latest version of R on our server. We have an older version in the bin directory, so that simply typing R in the command line brings this up. It is set up such that:



>which R
/bin/R


Our administrators will not upgrade R at this time and I need to use the latest version. In the past, I've been able to run programs without any bin or root access by simply putting them in my directory. I can then call those programs by typing out the whole path, instead of just typing "R".



I am unable to find a method for installing R that does not involve installing it in the bin through an installer such as apt-get. Is there a way for me to install R in my own directory, as I have done for other programs, without placing it in the /bin/ folder of system-wide executables, and without admin privileges?



We are on CentOS Linux release 7.2.1511



Update:
When I attempt the following, as recommended:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2


I get the following error because I don't have access to the /data/ directory it default to.




checking build system type... mkdir: cannot create directory
'/data/cg55281-32717': Permission denied mkdir: cannot create
directory '/data/cg-55281': Permission denied config.guess: cannot
create a temporary directory in /data configure: error: cannot guess
build type; you must specify one











share|improve this question

























  • How about installing R locally through anaconda? Also perhaps worth taking a look at: How to install R 3.2.2 using a conda environment on CentOS

    – Maurits Evers
    Nov 22 '18 at 2:28


















0















I need to run the latest version of R on our server. We have an older version in the bin directory, so that simply typing R in the command line brings this up. It is set up such that:



>which R
/bin/R


Our administrators will not upgrade R at this time and I need to use the latest version. In the past, I've been able to run programs without any bin or root access by simply putting them in my directory. I can then call those programs by typing out the whole path, instead of just typing "R".



I am unable to find a method for installing R that does not involve installing it in the bin through an installer such as apt-get. Is there a way for me to install R in my own directory, as I have done for other programs, without placing it in the /bin/ folder of system-wide executables, and without admin privileges?



We are on CentOS Linux release 7.2.1511



Update:
When I attempt the following, as recommended:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2


I get the following error because I don't have access to the /data/ directory it default to.




checking build system type... mkdir: cannot create directory
'/data/cg55281-32717': Permission denied mkdir: cannot create
directory '/data/cg-55281': Permission denied config.guess: cannot
create a temporary directory in /data configure: error: cannot guess
build type; you must specify one











share|improve this question

























  • How about installing R locally through anaconda? Also perhaps worth taking a look at: How to install R 3.2.2 using a conda environment on CentOS

    – Maurits Evers
    Nov 22 '18 at 2:28
















0












0








0








I need to run the latest version of R on our server. We have an older version in the bin directory, so that simply typing R in the command line brings this up. It is set up such that:



>which R
/bin/R


Our administrators will not upgrade R at this time and I need to use the latest version. In the past, I've been able to run programs without any bin or root access by simply putting them in my directory. I can then call those programs by typing out the whole path, instead of just typing "R".



I am unable to find a method for installing R that does not involve installing it in the bin through an installer such as apt-get. Is there a way for me to install R in my own directory, as I have done for other programs, without placing it in the /bin/ folder of system-wide executables, and without admin privileges?



We are on CentOS Linux release 7.2.1511



Update:
When I attempt the following, as recommended:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2


I get the following error because I don't have access to the /data/ directory it default to.




checking build system type... mkdir: cannot create directory
'/data/cg55281-32717': Permission denied mkdir: cannot create
directory '/data/cg-55281': Permission denied config.guess: cannot
create a temporary directory in /data configure: error: cannot guess
build type; you must specify one











share|improve this question
















I need to run the latest version of R on our server. We have an older version in the bin directory, so that simply typing R in the command line brings this up. It is set up such that:



>which R
/bin/R


Our administrators will not upgrade R at this time and I need to use the latest version. In the past, I've been able to run programs without any bin or root access by simply putting them in my directory. I can then call those programs by typing out the whole path, instead of just typing "R".



I am unable to find a method for installing R that does not involve installing it in the bin through an installer such as apt-get. Is there a way for me to install R in my own directory, as I have done for other programs, without placing it in the /bin/ folder of system-wide executables, and without admin privileges?



We are on CentOS Linux release 7.2.1511



Update:
When I attempt the following, as recommended:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2


I get the following error because I don't have access to the /data/ directory it default to.




checking build system type... mkdir: cannot create directory
'/data/cg55281-32717': Permission denied mkdir: cannot create
directory '/data/cg-55281': Permission denied config.guess: cannot
create a temporary directory in /data configure: error: cannot guess
build type; you must specify one








r linux unix installation centos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 1:00







naglemi

















asked Nov 22 '18 at 2:07









nagleminaglemi

85




85













  • How about installing R locally through anaconda? Also perhaps worth taking a look at: How to install R 3.2.2 using a conda environment on CentOS

    – Maurits Evers
    Nov 22 '18 at 2:28





















  • How about installing R locally through anaconda? Also perhaps worth taking a look at: How to install R 3.2.2 using a conda environment on CentOS

    – Maurits Evers
    Nov 22 '18 at 2:28



















How about installing R locally through anaconda? Also perhaps worth taking a look at: How to install R 3.2.2 using a conda environment on CentOS

– Maurits Evers
Nov 22 '18 at 2:28







How about installing R locally through anaconda? Also perhaps worth taking a look at: How to install R 3.2.2 using a conda environment on CentOS

– Maurits Evers
Nov 22 '18 at 2:28














1 Answer
1






active

oldest

votes


















0














Yes, This can be easily done as follows:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2

# build R
make

# install
make install


Once you build your own version of R, set environment variables:



export PATH=/path/to/your/local/dir/install/bin:$PATH
export R_HOME=/path/to/your/local/dir/install/lib64/R


These variables need to be set every time you want to use your own version of R.






share|improve this answer
























  • I've updated my original post to show an error I'm getting on the third step of this.

    – naglemi
    Nov 23 '18 at 1:01











  • Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

    – Dirk Eddelbuettel
    Nov 23 '18 at 1:06











  • @naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

    – Katia
    Nov 23 '18 at 15:56













  • I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

    – naglemi
    Nov 23 '18 at 21:25













  • @naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

    – Katia
    Nov 23 '18 at 21:45











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422930%2fhow-to-set-up-r-to-run-from-a-directory-with-no-bin-or-root-access%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Yes, This can be easily done as follows:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2

# build R
make

# install
make install


Once you build your own version of R, set environment variables:



export PATH=/path/to/your/local/dir/install/bin:$PATH
export R_HOME=/path/to/your/local/dir/install/lib64/R


These variables need to be set every time you want to use your own version of R.






share|improve this answer
























  • I've updated my original post to show an error I'm getting on the third step of this.

    – naglemi
    Nov 23 '18 at 1:01











  • Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

    – Dirk Eddelbuettel
    Nov 23 '18 at 1:06











  • @naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

    – Katia
    Nov 23 '18 at 15:56













  • I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

    – naglemi
    Nov 23 '18 at 21:25













  • @naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

    – Katia
    Nov 23 '18 at 21:45
















0














Yes, This can be easily done as follows:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2

# build R
make

# install
make install


Once you build your own version of R, set environment variables:



export PATH=/path/to/your/local/dir/install/bin:$PATH
export R_HOME=/path/to/your/local/dir/install/lib64/R


These variables need to be set every time you want to use your own version of R.






share|improve this answer
























  • I've updated my original post to show an error I'm getting on the third step of this.

    – naglemi
    Nov 23 '18 at 1:01











  • Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

    – Dirk Eddelbuettel
    Nov 23 '18 at 1:06











  • @naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

    – Katia
    Nov 23 '18 at 15:56













  • I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

    – naglemi
    Nov 23 '18 at 21:25













  • @naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

    – Katia
    Nov 23 '18 at 21:45














0












0








0







Yes, This can be easily done as follows:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2

# build R
make

# install
make install


Once you build your own version of R, set environment variables:



export PATH=/path/to/your/local/dir/install/bin:$PATH
export R_HOME=/path/to/your/local/dir/install/lib64/R


These variables need to be set every time you want to use your own version of R.






share|improve this answer













Yes, This can be easily done as follows:



wget http://cran.r-project.org/src/base/R-3/R-3.5.1.tar.gz

# untar the sources
tar xzvf R-3.5.1.tar.gz
cd R-3.5.1

# configure
./configure --prefix=/path/to/your/local/dir/install --enable-R-shlib --enable-memory-profiling --enable-R-profiling --with-valgrind-instrumentation=2

# build R
make

# install
make install


Once you build your own version of R, set environment variables:



export PATH=/path/to/your/local/dir/install/bin:$PATH
export R_HOME=/path/to/your/local/dir/install/lib64/R


These variables need to be set every time you want to use your own version of R.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '18 at 4:37









KatiaKatia

2,4891718




2,4891718













  • I've updated my original post to show an error I'm getting on the third step of this.

    – naglemi
    Nov 23 '18 at 1:01











  • Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

    – Dirk Eddelbuettel
    Nov 23 '18 at 1:06











  • @naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

    – Katia
    Nov 23 '18 at 15:56













  • I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

    – naglemi
    Nov 23 '18 at 21:25













  • @naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

    – Katia
    Nov 23 '18 at 21:45



















  • I've updated my original post to show an error I'm getting on the third step of this.

    – naglemi
    Nov 23 '18 at 1:01











  • Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

    – Dirk Eddelbuettel
    Nov 23 '18 at 1:06











  • @naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

    – Katia
    Nov 23 '18 at 15:56













  • I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

    – naglemi
    Nov 23 '18 at 21:25













  • @naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

    – Katia
    Nov 23 '18 at 21:45

















I've updated my original post to show an error I'm getting on the third step of this.

– naglemi
Nov 23 '18 at 1:01





I've updated my original post to show an error I'm getting on the third step of this.

– naglemi
Nov 23 '18 at 1:01













Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

– Dirk Eddelbuettel
Nov 23 '18 at 1:06





Essentially every GNU program works this way and the answer is entirely correct. But to be safe you could also set the prefix twice: once at configure time, and once again at make install time via make DESTDIR=/path/to/your/local/dir/install install.

– Dirk Eddelbuettel
Nov 23 '18 at 1:06













@naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

– Katia
Nov 23 '18 at 15:56







@naglemi In addition to what Dirk suggested above I would also recommend to check the permissions for the directory where you are trying to install R. It looks like you are trying to install R into a directory where you do not have permissions to write. In my answer /path/to/your/local/dir/ must be a directory which you created.

– Katia
Nov 23 '18 at 15:56















I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

– naglemi
Nov 23 '18 at 21:25







I have read, write and execute priveledges for the local directory I am trying to install to, and I created this directory. However, I'm still getting this error because it's trying to write something to this /data/ folder which I do not have access to and did not tell it to install anything into. I don't know why it's trying to do this. I grepped the "configure" script for "/data/" and it's not in there, or in the command to call the script.

– naglemi
Nov 23 '18 at 21:25















@naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

– Katia
Nov 23 '18 at 21:45





@naglemi It looks like your latest error says that configure cannot determine build type. This is a separate error. See some suggestions here: stackoverflow.com/questions/4810996/…

– Katia
Nov 23 '18 at 21:45


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422930%2fhow-to-set-up-r-to-run-from-a-directory-with-no-bin-or-root-access%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin