Skip to content

How to have multiple versions of R on Ubuntu 8.04

6 messages · Michael Rutter, Matthieu Stigler, Paul Johnson

#
Hi

I want to use a special package (openMx: 
http://openmx.psyc.virginia.edu/installing-openmx) that runs currently 
only on R 2.9 but I have R 2.10 installed (from CRAN).

How can I do to have the two versions ( 2.9 and czrrent 2.10) running? 
Is there a trick with apt-get or should I compile 2.9 from the sources? 
And if yes, how can I specify a special path for R 2.9 so that by 
default 2.10 is used?

Thanks a lot!

Matthieu Stigler
#
Matthieu,

Have you tried installing it?  We have just updated the versions of R on 
CRAN and maybe the bug the package website mentions have been fixed.

In order to have multiple version of R installed, you will need to build 
the second version from source.  Here are the details:

http://cran.r-project.org/doc/manuals/R-admin.html#Installing-R-under-Unix_002dalikes

You must be very careful to install R in a different location and have a 
different location for the lib files.  Read carefully through the 
section of Unix-like systems to see which options you need to set.  The 
good news is that you can always reinstall R 2.10 from apt-get or 
synaptic if the versions cross.

Another option to consider is using a virtual machine (I use Virtual 
Box, which is open source) with the needed version of R on it.  You can 
share data files between the host and virtual machine, if needed.

Hope this helps,
Michael
Matthieu Stigler wrote:

  
    
#
Dear Michael

Thanks a lot for your quick answer!


Michael Rutter a ?crit :
Yes I tried and unfortunately it does not solve the prob:
checking gcc version... 4.2.4
checking for gawk... /usr/bin/awk
checking for inst/npsol/linux/x86/gcc4.2/libnpsol.a... no
configure: error: npsol library not found
ERROR: configuration failed for package ?OpenMx?
Ok, so I need to compile :-( I'll try it, thanks for info!
Oh also? Mmh this would be something to do, but as I don't have any 
knowledge of it I think I'll try first to compile...

Thanks again for help!
#
Matthieu,

The problem is the lack of the npsol library on Ubuntu boxes.  Google 
was not helpful in finding an easy way to install this.  Part of the 
problem may be that you are using an older version of Ubuntu and the 
OpenMx group may not be supporting it  anymore.

I would search the OpenMx forums for a possible solution, since it seems 
to only effect that package.

Michael
Matthieu Stigler wrote:

  
    
1 day later
#
Hi Michael


Thanks that you looked for the error!
It seems the solution has ben found, but is still not available:

In order to install OpenMx, you will need R version 2.9.x. R versions, 
2.9.0 through 2.9.2 work fine.

Unfortunately there is a bug in 2.10.0 that prevents the use of our 
automatic installer. There is a patch for this bug available from CRAN 
<http://cran.r-project.org/>, but it requires you to compile R, so we 
don't recommend it for most people. For now, we are recommending R 
version 2.9.2 for use with OpenMx. We expect that the next version of R 
will include the bug fix and at that point we will begin official 
support for R 2.10.


So I think I just compile R 2.9, though I could compile 2.10 with the 
patch but thought the first solution is easier...

Thanks again!
2 days later
#
On Thu, Dec 17, 2009 at 1:42 PM, Michael Rutter <mar36 at psu.edu> wrote:
I've been monitoring OpenMX and I think I can answer this question.

OpenMx uses a commercial library called N-poly-solve.  That's missing
on your system, of course, since you probably did not buy it. The
OpenMx authors don't require users to buy that library, they provide a
shared library along with OpenMx source code. I've wondered why the
OpenMx folks don't use an optimizer native to R, but they don't, and
that's the way it is.   if the version of the Shared library
npolysol.la does not match the gcc version you have, then you are
"stuck" until the OpenMx folks rebuild the shared library to match the
gcc you have. I think that the CRAN rules on openness of code should
prevent the redistribution of the commercial npsolv library.

If you get the source code by joining the OpenMx beta tester program,
this will all  be more apparent to  you.

Hope This Helps.