[R] installing several versions of R (2.14 and 2.12.2) on the same system on Ubuntu

Duncan Murdoch murdoch.duncan at gmail.com
Mon Dec 5 23:54:48 CET 2011


On 11-12-05 4:03 PM, Peter Langfelder wrote:
> On Mon, Dec 5, 2011 at 11:47 AM, Jannis<bt_jannis at yahoo.de>  wrote:
>> Dear R users,
>>
>>
>> besides the current R 2.14 I would like to install a second version of R (2.12.2) on my Ubuntu system. The current version is easily installed as a precompiled package from Cran but I am heavily fighting with the older version. I tried to follow the instructions here:
>>
>> http://cran.r-project.org/doc/manuals/R-admin.html
>>
>> Unfortunately I got totally confused by all the different locations of the script, the library and the rest of the program. As I understand these all have to be different from the ones of the R 2.14 installation. In case anybody could point me to some nice instructions, fell welcome to do so.
>>
>>
>> Otherwise we would need to check what went wrong during my try. I finally managed to install R.2.12.2 but, as it seems, without Java correctly set up and without tcltk support (both are needed). r-base-dev is installed.
>>
>>
>> This I what I did:
>>
>> 1. downloaded R.2.12.2.tar.gz from Cran
>> 2. tar -xzf R-2.12.2.tar.gz
>> 3. sudo cp R-2.12.2 /usr/lib
>> 4. cd /usr/lib/R.2.12.2
>> 5. mkdir prog
>> 5. sudo ./configure --prefix=/usr/bin
>> 6. sudo make prefix=/usr/lib/R-2.12.2/prog rhome=/usr/lib/R-2.12.2/library
>>
>> 7. sudo mv /usr/bin/R /usr/bin/R-2.12.2
>>
>>
>> Most probably these two arguments for make are not correct as I did not fully understand the instructions here. Additionally I would need to facilitate tcl/tk and Java. Both works with R.2.14 so their dependecies should be installed but I probably need some more arguments during the build for that. Also this renaming of the R script seems arkward to me but I did this to easily run "R-2.12.2" or "R-2.14" from the command line.
>>
>>
>> Does anybody have any advice on how to fix this stuff?
>
> I think you did basically the right thing. To be able to compile R
> with tcl/tk, you have to install the development files for tcl/tk - on
> Fedora the files are contained in package tcl-devel (this is a
> Fedora/Ubuntu package, not an R package). Then run the entire
> compilation process (./configure, make, make install) again. When you
> install a pre-compiled R, you don't need the development files, which
> is probably why you never needed them in the past.
>
> I'm not sure about Java - you may want to examine the output of
> configure (which is usually saved in configure.log) to see what is
> missing.
>

Besides what Peter said, I would suggest that you follow the 
instructions for "simple compilation" in the document you cited.  You 
are doing way too much as a superuser.  You don't need that at all if 
you are the only user who needs this old version of R.  If you need to 
install it for others to use, then follow the instructions for 
"installation" in that document, and let your users change their path to 
select the R version.

Duncan Murdoch



More information about the R-help mailing list