Skip to content
Prev 171948 / 398503 Next

Installing different versions of R simultaneously on Linux

G'day Rainer,

On Fri, 27 Feb 2009 10:53:12 +0200
Rainer M Krug <r.m.krug at gmail.com> wrote:

            
Sorry, I am not familiar with that flavour; before switching to Debian
(and Debian based distributions), I was using RedHat.  And before that
Slackware.
I do the "make install" step manually, the script just alerts the
system that another alternative for the R command was installed.

If memory serves correctly, the "alternatives" mechanism was developed
by Debian and adopted by RedHat (or the other way round).  I am not
sure whether SuSE has adopted this, or a similar system.

Essentially, for a command, say foo, for which several alternatives
exists, is installed on the system in, say /usr/bin/, as a link
to /etc/alternatives/foo and /etc/alternatives/foo is a link to the
actual program that is called.  

E.g. on my machine I have

berwin at berwin-nus1:~$ update-alternatives --list wish
/usr/bin/wish8.5
/usr/bin/wish8.4

which tells me that wish 8.5 and wish8.4 are installed and I could call
them explicitly.  /usr/bin/wish is a link to /etc/alternatives/wish
and /etc/alternatives/wish will point to either of these two programs
(depending on what the system admin decided should be the default, i.e.
should be used if a user just types 'wish').  

A command like "update-alternatives --config wish" allows to configure
whether "wish" should mean "wish8.5" or "wish8.4".  And all that is
necessary is to change the link in /etc/alternatives/wish to point at
the desired program.
As I said, I do not know whether SuSE offers this alternatives system
or a similar system.  If it does, perhaps it is just a matter of
installing some additional packages?  If it offers a different, but
similar system, then you would have to ask on a SuSE list on that
system is maintained and configured.

On my machine I would say "apt-file search update-alternatives" to find
out which package provides that command and to install that package if
it is not yet installed.  I am afraid I do not know what the equivalent
command on SuSE is.
Well, if you ever use a system that has the alternatives set up and the
update-alternatives command, I am happy to share my script with you. 

Cheers,

	Berwin