'OpenMx' is not available

22 replies [Last post]
mkeller's picture
Offline
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)"

pgseye's picture
Offline
Joined: 10/13/2009
I've just come across OpenMx

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)"

 

 

 

Jeff's picture
Offline
Joined: 07/31/2009
Hi, Paul, we'll do our best

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.

 

pgseye's picture
Offline
Joined: 10/13/2009
Hi Jeff, This is terminal

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$ 
<span style="font-family: Verdana, sans-serif; white-space: normal; font-size: 12px; color: #494949;">This is error I receive in R:</span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">&gt; source('http://openmx.psyc.virginia.edu/getOpenMx.R')&nbsp;</span></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">Warning: unable to access index for repository http://openmx.psyc.virginia.edu/packages/bin/macosx/leopard/contrib/2.9&nbsp;</span></span></span>
<span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘OpenMx’ is not available</span></span></span>
<span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><br /></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">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.</span></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">Many Thanks,&nbsp;</span></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">Paul&nbsp;</span></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><br /></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: x-small;"><span style="font-size: small;">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.</span></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: xx-small;"><br /></span></span><span style="font-family: Verdana, sans-serif; color: #494949;"><span style="white-space: normal; font-size: xx-small;"><br /></span></span>

 

 

 

Jeff's picture
Offline
Joined: 07/31/2009
Ah, the problem is that it's

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.

pgseye's picture
Offline
Joined: 10/13/2009
Great Jeff. That does indeed

Great Jeff.

That does indeed work. Now I can start learning about it.

Many thanks,

Paul

mspiegel's picture
Offline
Joined: 07/31/2009
I found the solution on my

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.

mspiegel's picture
Offline
Joined: 07/31/2009
Opened a ticket:
mkeller's picture
Offline
Joined: 08/04/2009
OK, I installed it manually

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.

tyork's picture
Offline
Joined: 08/26/2009
Thanks for your post Matt. I

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..

Steve's picture
Offline
Joined: 07/30/2009
Are you on a PPC machine or

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

tyork's picture
Offline
Joined: 08/26/2009
I verified that i do have

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'

mspiegel's picture
Offline
Joined: 07/31/2009
Copy/paste the results of ls

Copy/paste the results of ls -l /usr/local/lib and also ls -l /usr/local/gfortran/lib. I found a similar error here http://mail.scipy.org/pipermail/numpy-discussion/2008-April/033061.html

tyork's picture
Offline
Joined: 08/26/2009
timothy-yorks-macbook-pro:~

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

mspiegel's picture
Offline
Joined: 07/31/2009
Copy/paste the results of

Copy/paste the results of "locate libgfortran"

tyork's picture
Offline
Joined: 08/26/2009
timothy-yorks-macbook-pro:~

timothy-yorks-macbook-pro:~ tpyork$ locate libgfortran
/Library/Frameworks/R.framework/Versions/2.9/Resources/lib/libgfortran.2.dylib

mspiegel's picture
Offline
Joined: 07/31/2009
Try this: cd

Try this:

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

And then try loading the OpenMx library in R.

tyork's picture
Offline
Joined: 08/26/2009
That worked! Any chance,

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 !!!

Jeff's picture
Offline
Joined: 07/31/2009
Not sure why this is

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.

mspiegel's picture
Offline
Joined: 07/31/2009
I was hoping that someone

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.

Steve's picture
Offline
Joined: 07/30/2009
Good catch! I'm not sure why,

Good catch!

I'm not sure why, but my guess is that R tried to create a symlink at /usr/local/lib and failed without an error. Again, it is a mystery why R should want to do this rather than just point to its own dylib.

mspiegel's picture
Offline
Joined: 07/31/2009
Hmm, the latest version is

Hmm, the latest version is OpenMx 0.1.5-851. Not that an earlier version should not install, but it's a good idea to install the most recent version.

tyork's picture
Offline
Joined: 08/26/2009
Sorry, i didn't mention that

Sorry, i didn't mention that i did try with the most recent version (0.1.5-851).