'OpenMx' is not available

Posted on
Picture of user. mkeller Joined: 08/04/2009
Darnit! Today was "the day" for starting to learn OpenMx, but I'm having trouble installing. Both snow and snowfall install fine, but I get this warning upon trying to install OpenMx:

install.packages(pkgs=c('OpenMx'), repos=repos)
Warning: unable to access index for repository http://openmx.psyc.virginia.edu/...[redacted]
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘OpenMx’ is not available

OpenMx is not installed, as checked by installed.packages(). I tried it using 32-bit R and 64-bit R. Same warning in both. It seems OpenMx isn't there?? Any help would be appreciated...

Here's my info:
> R.Version()
$platform
[1] "x86_64-apple-darwin9.8.0"

$arch
[1] "x86_64"

$os
[1] "darwin9.8.0"

$system
[1] "x86_64, darwin9.8.0"

$status
[1] ""

$major
[1] "2"

$minor
[1] "9.2"

$year
[1] "2009"

$month
[1] "08"

$day
[1] "24"

$`svn rev`
[1] "49384"

$language
[1] "R"

$version.string
[1] "R version 2.9.2 (2009-08-24)"

Replied on Wed, 09/16/2009 - 16:44
Picture of user. mkeller Joined: 08/04/2009

OK, I installed it manually by downloading the *.tgz file from [redacted]
and then using install.packages():

install.packages("/Users/matthewkeller/Downloads/OpenMx_0.1.3-776.tgz",repos=NULL)

Seems to be fine now.

Replied on Tue, 09/29/2009 - 11:58
Picture of user. tyork Joined: 08/26/2009

In reply to by mkeller

Thanks for your post Matt. I tried your suggestion and it looks like OpenMx was successfully installed into my library: "/Library/Frameworks/R.framework/Versions/2.9/Resources/library/OpenMx"

But when i try to load the package using the function "library(OpenMx)", i get the error message: "Error in library(OpenMx) : 'OpenMx' is not a valid installed package"

I can also see 'OpenMx' in the Package Manager, but alas it won't load from there either.

Have i forgotten to do something basic to complete the package installation? I'm running OS X 10.5.7 and R version 2.9.2. Help from anyone is appreciated..

Replied on Tue, 09/29/2009 - 22:42
Picture of user. Steve Joined: 07/30/2009

In reply to by tyork

Are you on a PPC machine or Intel?

I just tried it here on OS X 10.5.8 / R 2.9.2 / Intel and the install ran fine.

> source('youknowwhere')
Loading Tcl/Tk interface ... done
trying URL 'http://cran.mtu.edu/bin/macosx/universal/contrib/2.9/snowfall_1.70.tgz'
Content type 'application/x-gzip' length 221764 bytes (216 Kb)
opened URL
==================================================
downloaded 216 Kb


The downloaded packages are in
	/var/folders/ih/ihj8VEW62RW+x++8ZQGWh+++jd+/-Tmp-//RtmpGEBLRV/downloaded_packages
trying URL 'http://XXX/OpenMx_0.1.5-851.tgz'
Content type 'application/x-gzip' length 816445 bytes (797 Kb)
opened URL
==================================================
downloaded 797 Kb


The downloaded packages are in
	/var/folders/ih/ihj8VEW62RW+x++8ZQGWh+++jd+/-Tmp-//RtmpGEBLRV/downloaded_packages
> library(OpenMx)
> mxVersion()
[1] "0.1.5-851"

Have you checked whether you have write permissions on the full directory tree for R? Sometimes on OS-X updates that gets mucked with. This will give you permissions again:

sudo chmod -R ug+rwX /Library/Frameworks/R.framework

Replied on Wed, 09/30/2009 - 10:33
Picture of user. tyork Joined: 08/26/2009

In reply to by Steve

I verified that i do have read/write permissions and i'm using "OS X 10.5.7 / R 2.9.2 / Intel/ MacBookPro". Everything seems to proceed fine (below) until i run the "library(OpenMx)" function (error message at end of reply).

Any additional suggestions would be greatly appreciated.

> source('iknowwhere')
trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/macosx/universal/contrib/2.9/snowfall_1.70.tgz'
Content type 'application/x-gzip' length 221764 bytes (216 Kb)
opened URL
==================================================
downloaded 216 Kb

The downloaded packages are in
/var/folders/5l/5l9k4BpLHjyWjbId9rS8d++++TI/-Tmp-//RtmpVTwFgS/downloaded_packages
trying URL 'http://XXX/OpenMx_0.1.5-851.tgz'
Content type 'application/x-gzip' length 816445 bytes (797 Kb)
opened URL
==================================================
downloaded 797 Kb

The downloaded packages are in
/var/folders/5l/5l9k4BpLHjyWjbId9rS8d++++TI/-Tmp-//RtmpVTwFgS/downloaded_packages

> library(OpenMx)

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared library '/Library/Frameworks/R.framework/Resources/library/OpenMx/libs/i386/OpenMx.so':
dlopen(/Library/Frameworks/R.framework/Resources/library/OpenMx/libs/i386/OpenMx.so, 6): Library not loaded: /usr/local/lib/libgfortran.2.dylib
Referenced from: /Library/Frameworks/R.framework/Resources/library/OpenMx/libs/i386/OpenMx.so
Reason: image not found
Error in library(OpenMx) : .First.lib failed for 'OpenMx'

Replied on Wed, 09/30/2009 - 11:40
Picture of user. tyork Joined: 08/26/2009

In reply to by mspiegel

timothy-yorks-macbook-pro:~ tpyork$ ls -l /usr/local/lib
total 24640
drwxr-xr-x 8 root wheel 272 Sep 30 11:09 Tktable2.9
-rwxr-xr-x 1 root wheel 314776 Jan 8 2008 libfuse.0.0.0.dylib
-rwxr-xr-x 1 root wheel 314776 Jan 8 2008 libfuse.0.dylib
-rw-r--r-- 1 root wheel 1024152 Jan 8 2008 libfuse.a
-rwxr-xr-x 1 root wheel 314776 Jan 8 2008 libfuse.dylib
-rwxr-xr-x 1 root wheel 804 Jan 8 2008 libfuse.la
-r-xr-xr-x 1 root wheel 4820229 Oct 21 2008 libtcl8.5.dylib
-rw-r--r-- 1 root wheel 11072 Oct 21 2008 libtclstub8.5.a
-rwxr-xr-x 1 root wheel 5602072 Oct 21 2008 libtk8.5.dylib
-rw-r--r-- 1 root wheel 14304 Oct 21 2008 libtkstub8.5.a
-rwxr-xr-x 1 root wheel 38900 Jan 8 2008 libulockmgr.0.0.0.dylib
-rwxr-xr-x 1 root wheel 38900 Jan 8 2008 libulockmgr.0.dylib
-rw-r--r-- 1 root wheel 41168 Jan 8 2008 libulockmgr.a
-rwxr-xr-x 1 root wheel 38900 Jan 8 2008 libulockmgr.dylib
-rwxr-xr-x 1 root wheel 832 Jan 8 2008 libulockmgr.la
drwxr-xr-x 3 root wheel 102 Mar 27 2009 pkgconfig
drwxr-xr-x 5 root wheel 170 Oct 21 2008 tcl8
drwxr-xr-x 18 root wheel 612 Sep 30 11:09 tcl8.5
-rw-r--r-- 1 root wheel 7730 Oct 21 2008 tclConfig.sh
drwxr-xr-x 37 root wheel 1258 Sep 30 11:09 tk8.5
-rw-r--r-- 1 root wheel 4017 Oct 21 2008 tkConfig.sh

timothy-yorks-macbook-pro:~ tpyork$ ls -l /usr/local/gfortran/lib
ls: /usr/local/gfortran/lib: No such file or directory

Replied on Wed, 09/30/2009 - 15:25
Picture of user. tyork Joined: 08/26/2009

In reply to by mspiegel

That worked! Any chance, when you have time, you could briefly educate me (and others reading this post) about the root of the problem?? I gather the libfortran.2.dylib file wasn't in the assumed location; but why??

Many thanks for fixing the problem !!!

Replied on Wed, 09/30/2009 - 19:50
Picture of user. mspiegel Joined: 07/31/2009

In reply to by tyork

I was hoping that someone else knows the answer. I don't know why R is looking for libgfortran in /usr/local/lib, since it has a copy of the library in the /Frameworks directory structure. Maybe someone else can post the answer, or you can try posting the R mailing list and see if someone there knows why it happened.
Replied on Fri, 10/02/2009 - 13:58
Picture of user. Jeff Joined: 07/31/2009

In reply to by tyork

Not sure why this is happening, but we had to use the symbolic link trick before with another user. I don't know if it's because you're not installing R from root or maybe it's the result of upgrading and not doing a clean install. This might be worth going to the R lists for at some point.
Replied on Tue, 09/29/2009 - 16:05
Picture of user. mspiegel Joined: 07/31/2009

Opened a ticket: http://openmx.psyc.virginia.edu/issue/2009/09/installer-not-working
Replied on Tue, 09/29/2009 - 23:04
Picture of user. mspiegel Joined: 07/31/2009

I found the solution on my machine. Upgrade R to version 2.9.2. The PACKAGES file has a line that says R (>= 2.9.1), and it should say 2.9.0 but I think even 2.7.2 would work. I'll update the ticket with 2.9.0 information.
Replied on Tue, 10/13/2009 - 23:22
No user picture. pgseye Joined: 10/13/2009

I've just come across OpenMx and am very new to SEM. I'm doing a PhD and will need to do some heritability analyses on twins. As I hadn't thrown myself into learning Mx yet, I thought OpenMx might be a better way to go because of its integration with R and active user community.

But I can't get it to install!

I'm getting the exact same error as the first poster. I'm using a Macbook Pro with Snow Leopard and I just re-installed R (2.9.2) last night (package version) so that I had 32 bit and 64 bit versions (I also want to use the JGR GUI and you need 64 bit R for that). I've read through this thread and tried the various solutions. I didn't have gfortran installed and have since done that and added it to my user Path, but I still receive the same error when trying to install OpenMx.

Any other ideas? I want to be able to use and learn this.

Thanks,

Paul

 

P.S.

Some details of R installation:

 

> R.Version()

$platform

[1] "i386-apple-darwin9.8.0"

 

$arch

[1] "i386"

 

$os

[1] "darwin9.8.0"

 

$system

[1] "i386, darwin9.8.0"

 

$status

[1] ""

 

$major

[1] "2"

 

$minor

[1] "9.2"

 

$year

[1] "2009"

 

$month

[1] "08"

 

$day

[1] "24"

 

$`svn rev`

[1] "49384"

 

$language

[1] "R"

 

$version.string

[1] "R version 2.9.2 (2009-08-24)"

 

 

 

Replied on Wed, 10/14/2009 - 00:15
Picture of user. Jeff Joined: 07/31/2009

In reply to by pgseye

Hi, Paul, we'll do our best to get things working for you.  Can you copy and paste the exact error you are getting?  Also, did you try this at the terminal:

cd /usr/local/lib
sudo ln -s /Library/Frameworks/R.framework/Versions/2.9/Resources/lib/libgfortran.2.dylib

Let us know.

 

Replied on Wed, 10/14/2009 - 06:13
No user picture. pgseye Joined: 10/13/2009

In reply to by Jeff

Hi Jeff,

This is terminal output based on what you've suggested:

 

Paul-MBP:~ paulsanfilippo$ cd /usr/local/lib
Paul-MBP:lib paulsanfilippo$ sudo ln -s /Library/Frameworks/R.framework/Versions/2.9/Resources/lib/libgfortran.2.dylib
Password:
ln: ./libgfortran.2.dylib: File exists
Paul-MBP:lib paulsanfilippo$ 

This is error I receive in R:
> source('http://openmx.psyc.virginia.edu/getOpenMx.R') 
Warning: unable to access index for repository http://openmx.psyc.virginia.edu/packages/bin/macosx/leopard/contrib/2.9 
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘OpenMx’ is not available

Any help you can offer would be greatly appreciated - I'm nor particularly savvy with the behind-the-scenes working of either R or Terminal.
Many Thanks, 
Paul 

P.S. - The other thing (and I don't know whether this is of relevance) is that OpenMX doesn't show up as a package to install when I browse the CRAN library.


 

 

 

Replied on Wed, 10/14/2009 - 09:51
Picture of user. Jeff Joined: 07/31/2009

In reply to by pgseye

Ah, the problem is that it's looking in the wrong place for the repository--*/leopard/* instead of */universal/*.  Give the install a try now:

source('http://openmx.psyc.virginia.edu/getOpenMx.R');

And you're right: OpenMx doesn't show up as a package on CRAN. CRAN is just a host for packages and, currently, we're hosting our own packages. The above command actually just runs the installer, changing the host from CRAN to our server while you install the OpenMx package.

Let me know if that works. If it doesn't, again, copy and paste the error.