Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When installing R (the interpreter and the shared library) the documentation says that one should follow the next steps:

 # <go to the R source directory>
 make distclean
 ./configure --enable-R-shlib
 make
 make install

Here I have one question:

Q1. What is the difference between make and make install (do I need to run both commands?)

Q2. Say I don't have root access that I would like to install R under a specific path /path/to/R/. The documentation mentions I should use the options:

./configure --prefix /path/to/R

and

make prefix=/path/to/R install

Do I really have to pass the path to both commands? (i.e. to ./configure and to make). If I recall correctly from installing other SW, usually using the ./configure --prefix is enough.

share|improve this question

migrated from stackoverflow.com Nov 6 '12 at 3:05

This question came from our site for professional and enthusiast programmers.

    
I haven't checked this with R, so I can't put it as an answer, but the normal procedure is for the Makefile (used by make) to support a prefix variable (although it often has a different name) that sets the location where the software will be copied in the make install step, and for the ./configure step (which generates the Makefile) to support a --prefix option to set the default value of that variable in the Makefile. So either of them should suffice. I only use the prefix option on ./configure. –  reinierpost Nov 7 '12 at 10:07
add comment

1 Answer

Answer for Q1: make compile the source code. make install move the compiled binary file to the install path according to the settings.

Answer for Q2: You do not have root access, so you can not install the software in the default path. You really need to pass the path (under your home directory) to both commands. Like this:

./configure --prefix=/home/YourUserName/path/to/R

and

make prefix=/home/YourUserName/path/to/R install

I have tried myself, and it works.

For more details, see R-admin.pdf

share|improve this answer
2  
This doesn't answer the questions asked. –  reinierpost Nov 5 '12 at 9:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.