You are here

Mac Pro Server Installation Problem

29 posts / 0 new
Last post
pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Mac Pro Server Installation Problem

Am I missing a step? Did source('http://...'), library(OpenMx) and problems came up.

> source('REDACTED')
trying URL 'http://cran.wustl.edu/bin/macosx/universal/contrib/2.9/snowfall_1.70.tgz'
Content type 'application/x-tar' length 221764 bytes (216 Kb)
opened URL
==================================================
downloaded 216 Kb

The downloaded packages are in
/var/folders/4P/4PjGpUneHz4ihgwMhvzYPE+++TI/-Tmp-//RtmpN2blBk/downloaded_packages
trying URL 'REDACTED'
Content type 'application/x-gzip' length 2356993 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb

The downloaded packages are in
/var/folders/4P/4PjGpUneHz4ihgwMhvzYPE+++TI/-Tmp-//RtmpN2blBk/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'
> R.Version()
$platform
[1] "i386-apple-darwin8.11.1"

$arch
[1] "i386"

$os
[1] "darwin8.11.1"

$system
[1] "i386, darwin8.11.1"

$status
[1] ""

$major
[1] "2"

$minor
[1] "9.1"

$year
[1] "2009"

$month
[1] "06"

$day
[1] "26"

$`svn rev`
[1] "48839"

$language
[1] "R"

$version.string
[1] "R version 2.9.1 (2009-06-26)"

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
OpenMx does show up under

OpenMx does show up under installed.packages(), but I'm not doing something right because:

> mxMatrix()
Error: could not find function "mxMatrix"

Steve's picture
Offline
Joined: 07/30/2009 - 14:03
I wonder if this is a

I wonder if this is a permissions problem since you're using OS X Server

Are you logged in as an account that has permissions to write to
/Library/Frameworks/R.framework/Resources/library/

You might need to do the install as an administrator, depending on how your OS X Server is set up.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Turns out --- Not just a

Turns out --- Not just a server issue. Similar issues on my laptop (Mac Pro)

> source('http:...')
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/96/96lirKLcEKeAKV3pKF6Y2E+++TI/-Tmp-//RtmpkKyMfC/downloaded_packages
trying URL 'http:...'
Content type 'application/x-gzip' length 2356993 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb

The downloaded packages are in
/var/folders/96/96lirKLcEKeAKV3pKF6Y2E+++TI/-Tmp-//RtmpkKyMfC/downloaded_packages

> library(OpenMx)
Loading required package: snowfall
Loading required package: snow
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'

> R.Version()
$platform
[1] "i386-apple-darwin8.11.1"

$arch
[1] "i386"

$os
[1] "darwin8.11.1"

$system
[1] "i386, darwin8.11.1"

$status
[1] ""

$major
[1] "2"

$minor
[1] "9.1"

$year
[1] "2009"

$month
[1] "06"

$day
[1] "26"

$`svn rev`
[1] "48839"

$language
[1] "R"

$version.string
[1] "R version 2.9.1 (2009-06-26)"

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
p.s. I'm admin on both

p.s. I'm admin on both computers.

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
Hi, Pascal, Let's start out

Hi, Pascal,

Let's start out in terminal:

> ls /usr/local/lib/libgfortran.2.dylib

Is it there? If it is, it's a permission issue to that file. If it's not, then you probably need to do a clean install of R for all users. But let's do a quick search first:

> locate libgfortran.2.dylib

If it doesn't find it, then, if you have time:

> /usr/libexec/locate.updatedb
> locate libgfortran.2.dylib

The first will update your "locate" databases.

If it did find it, then you can do an "ln -s" to the file in /usr/local/lib or just cp it there.

As Steve pointed out, the fact that it's server may be causing some problems.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Both computers --- here's the

Both computers --- here's the problem.

ComputerName:~ pascal$ ls /usr/local/lib/libgfortran.2.dylib
ls: /usr/local/lib/libgfortran.2.dylib: No such file or directory

ComputerName:~ pascal$ locate libgfortran.2.dylib
/Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib

What's the best way to fix this?

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
Give this a try: > sudo ln

Give this a try:

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

That should be all on one line.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Terminal: ComputerName:~

Terminal:

ComputerName:~ localadmin$ sudo ln -s /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib /usr/local/lib/libgfortran.2.dylib
Password:
ComputerName:~ localadmin$

R:

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

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
Let's see output from: > ls

Let's see output from:

> ls -la /usr/local/lib/libgfortran.2.dylib
pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
lrwxr-xr-x 1 root wheel 78

lrwxr-xr-x 1 root wheel 78 Aug 21 09:30 /usr/local/lib/libgfortran.2.dylib -> /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Same thing, both computers.

Same thing, both computers. (MacBook Pro & Mac Pro Server)

AdminJeff's picture
Offline
Joined: 07/28/2009 - 13:30
Let's try a clean install of

Let's try a clean install of R on the MacBook Pro. Is that possible, Pascal?

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Will do. First let me throw

Will do. First let me throw out something else. In the other forum, tbates refers to version 714. Using installed.packages() in R, OpenMx is listed with version "0.1.2-708." Is this a separate/additional potential issue?

AdminJeff's picture
Offline
Joined: 07/28/2009 - 13:30
That refers to using the

That refers to using the latest SVN version, instead of an "official" release. If you'd like to have the most up-to-date version, we can point you to the svn repository. But, for this problem, it's unrelated.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Tried it --- still having

Tried it --- still having problems.

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'

In the terminal, I tried locating the file and got:

ComputerName:~ pascal$ ls /usr/local/lib/libgfortran.2.dylib
/usr/local/lib/libgfortran.2.dylib
ComputerName:~ pascal$

permissions are: lrwxr-xr-x

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
What do you think of

What do you think of this?

ComputerName:~ localadmin$ ls -la /usr/local/lib/libgfortran.2.dylib

lrwxr-xr-x 1 root wheel 78 Aug 21 09:30 /usr/local/lib/libgfortran.2.dylib -> /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib

ComputerName:~ localadmin$ ls -la /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib

ls: /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib: No such file or directory

ComputerName:~ localadmin$ locate libgfortran.2.dylib

/Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
I think there's some bad

I think there's some bad magic going on there. Did you try a reinstall yet? You might want to sudo rm usr/local/lib/libgfortran.2.dylib first.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
That was after the reinstall.

That was after the reinstall. I'll try again, after using the command you listed.

I wouldn't find this so odd, except that both computers seem to be doing the same thing.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
So... I can't remove it,

So... I can't remove it, because "No such file or directory"

yet it turns up with ls -la

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
I'm guessing this is due, in

I'm guessing this is due, in some way, to how I updated my R version. We might want to include this fix in a Troubleshooting part of the documentation.

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
Might help to ask people to

Might help to ask people to start with a fresh install of R, and if they don't, then make that the first port of call for trouble?

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
If they have the latest

If they have the latest version, then we should see if we can fix first, as these issues could pop up when we have to support earlier versions of R as well, that is, when R 2.9.2 comes out.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Poor Solution: I made a copy

Poor Solution:

I made a copy of R.framework/Versions/2.9 and relabeled it 2.7. Now when it goes to

/usr/local/lib/libgfortran.2.dylib

it finds

/Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libgfortran.2.dylib

However, when I try to

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

It complains the file exists. When I try to remove /usr/local/lib/libgfortran.2.dylib, it complains that no such file exists. So ugly solution, and some bad voodoo, but it is working. Question is what is the underlying problem? These are two very different machines --- one OS X 10.5.8 server, the other just OS X 10.5.8. I can see if the problem will replicate with one of my machines downstairs, but I suspect the result will be the same.

On a tangent, I get the complaint from R:

> library(OpenMx)
Created directory: /var/localadmin/.sfCluster/restore
snowfall 1.70 initialized: sequential execution, one CPU.

Warning message:
In searchCommandline(parallel, cpus = cpus, type = type, socketHosts = socketHosts, :
Unknown option on commandline: --gui

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
That last message is a

That last message is a warning from snowfall. It's not our fault. And it doesn't indicate that something is wrong.

pdeboeck's picture
Offline
Joined: 08/04/2009 - 15:55
Thanks!

Thanks!

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
Thanks for your hard work on

Thanks for your hard work on this, Pascal. If you want, I can remote desktop in sometime to see if I can figure out what's happening, it no one else can come up with anything, but I agree: some bad voodoo.

Steve's picture
Offline
Joined: 07/30/2009 - 14:03
This looks to me like a

This looks to me like a permissions problem.

Someplace on the directory tree you likely don't have permission to read anything further up the tree (for trees that grow up from their roots).

That's the only thing I know of that can create the symptoms you are describing: a file exists some times (especially when sudo'ing) and doesn't appear to exist at other times.

If your user is named "pdeboeck", you might try

cd /Library/Frameworks
chown -R pdeboeck R.framework

That will make "all your base belong to you".

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
Might also be time for

Might also be time for cmd-space "Disk Utility"

First Aid:Repair Disk Permissions

Log in or register to post comments