Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
407 views
in Technique[技术] by (71.8m points)

installation - How to install 2 different R versions on Debian?

On our server, R 2.12.1 is installed following the instructions on http://cran.r-project.org/bin/linux/debian/ , using apt-get install etc etc.

Due to circumstances the old lenny machine hasn't been updated to the new stable debian, and it looks like this isn't about to happen soon. As some of the research here depends on the latest version of VGAM, we need the R 2.14.0 installed on debian. But in order to keep old code running, we can't just drop the R 2.12.1 (installing the VGAM 0.8.4 on this version gives errors).

So we need to install 2 R-versions. From the little I understood, if we just use apt-get upgrade the old version will be replaced by the new. I've been going through heaps of documentation, but I can't find the optimal way of doing so.

The only thing I could imagine now, is to try to build the latest R from source, but my colleagues were not very keen on that idea and prompted me to first look for another solution. Any info I missed, or is somebody willing to show me the little trick to get this done? If building from source is the solution, I'd like to hear about any pitfalls or possible problems.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can install different versions of ANY software using proper compile flags. When you run the configure script with --help you should see an option to see the install root.

Take a look at

./configure --help
...
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]

so you could install R-2.14 to:

/usr/local/R/2.14

and you could install R-2.12 to:

/usr/local/R/2.12

when you launch the configure script do:

./configure --prefix=/usr/local/R/2.14

and so on.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...