Problems with Mac install

5 replies [Last post]
dr.edgcumbe's picture
Offline
Joined: 02/25/2010

Using an Intel-based Macbook running Leopard, with R 2.10.1.

It seems to download OpenMX OK:

> source('http://openmx.psyc.virginia.edu/getOpenMx.R')
trying URL 'http://openmx.psyc.virginia.edu/packages/bin/macosx/leopard/contrib/2.10/OpenMx_0.2.6-1114.tgz'
Content type 'application/x-gzip' length 1295567 bytes (1.2 Mb)
opened URL
==================================================
downloaded 1.2 Mb

The downloaded packages are in
/var/folders/YI/YI+NJBs1FmmwRs4bkTzB6E+++TI/-Tmp-//RtmpqaP1DH/downloaded_packages
> require(OpenMX)

But then when I type: require(OpenMX), I get this message:

Loading required package: OpenMX
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'OpenMX'

Any ideas what might be going on?

TIA,

Dan

mspiegel's picture
Offline
Joined: 07/31/2009
Dan: R is case-sensitive.

Dan: R is case-sensitive. Try require(OpenMx)

jaimesettle's picture
Offline
Joined: 01/24/2010
Hi, I wish I could help but I

Hi,

I wish I could help but I am having a similar problem!

I'm also having problems with a Mac and Leopard, running 2.10.1, though I am getting a different error message.

It downloads OpenMX using the source command, but when I try to load it with library(OpenMx), I get:

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

When I try require(OpenMx), I get:

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

Thanks,

Jaime

jaimesettle's picture
Offline
Joined: 01/24/2010
Update. A very smart

Update. A very smart colleague of mine was able to figure this out.

after installing OpenMx type "library(OpenMx)".

The error obtains because the file "libgfortran.2.dylib" is missing; therefore take the following steps:

(1) in the terminal check for this file "libgfortran.2.dylib":

ls -l /usr/local/lib/libgfortran.2.dylib

(2) if it does not exist download and install FINK COMMANDER:
http://www.finkproject.org/download/

(3) open Fink commander and in the search field type gcc42
2 files appear install the second one, which is called gcc42-shlibs. Highlight the gcc42-shlibs fie and click the "install packages in source" button in upper lefthand corner that has a little green plus sign (second icon to the left).

(4) back in the terminal enter the following command:
sudo ln -s /sw/lib/gcc4.2/lib/libgfortran.2.dylib /usr/local/lib/libgfortran.2.dylib

(5) repeat the check command in step (1) above

(6) if the file exists, the "library(OpenMx)" command should now work properly

Jeff's picture
Offline
Joined: 07/31/2009
While this is a working

While this is a working solution, as Mike said, we recommend following the advice in:

http://openmx.psyc.virginia.edu/thread/316

The Fink solution will probably work just fine, but there is the chance that the Fink version is compiled differently than what R provides, which is what we use to develop and test with.

mspiegel's picture
Offline
Joined: 07/31/2009
Jaime: use the instructions

Jaime: use the instructions posted here http://openmx.psyc.virginia.edu/thread/316 to get the library working.