Skip to content

Can't load MASS when using Mac GUI.

3 messages · Brian Ripley, Rolf Turner

#
If I start R by clicking on the R icon on the ``dock'' then I am unable
to load the MASS package.

I get:

  > library(MASS)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library '/Users/rturner/Rlib/MASS/libs/i386/ 
MASS.so':
   dlopen(/Users/rturner/Rlib/MASS/libs/i386/MASS.so, 6): Library not  
loaded: /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/ 
libR.dylib
   Referenced from: /Users/rturner/Rlib/MASS/libs/i386/MASS.so
   Reason: image not found
Error: package/namespace load failed for 'MASS'


Can anyone tell me what's going wrong here?  Anything I can do about it?

If I start R from the command line, there is no problem.

My session info from the GUI:

 > sessionInfo()
R version 2.8.1 (2008-12-22)
i386-apple-darwin8.11.1

locale:
en_NZ.UTF-8/en_NZ.UTF-8/C/C/en_NZ.UTF-8/en_NZ.UTF-8

attached base packages:
[1] datasets  utils     stats     graphics  grDevices methods   base

loaded via a namespace (and not attached):
[1] tools_2.8.1

And from the command line startup:

 > sessionInfo()
R version 2.8.1 (2008-12-22)
i386-apple-darwin8.11.1

locale:
C

attached base packages:
[1] datasets  utils     stats     graphics  grDevices methods   base

other attached packages:
[1] misc_0.0-11    fortunes_1.3-5 MASS_7.2-44


Thanks for any insights.

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
#
You are tryig to use MASS built for R 2.7.x on 2.8.1.
Looks like /Users/rturner/Rlib needs updating.
On Wed, 18 Feb 2009, Rolf Turner wrote:

            
Note the 2.7 here.
Different version of R, or different library paths.  Try .libPaths() 
in each.

  
    
#
On 18/02/2009, at 7:48 PM, Prof Brian Ripley wrote:

            
Yep.  That was the problem.  Thanks.

Actually I could just *get rid* of MASS (VR bundle generally) in
/Users/rturner/Rlib since this bundle is of course in the main
R library and in this location is of course up-to-date.  Whence
the version of the bundle in /User/rturner/Rlib is redundant and
merely serves as a potential source of problems.

I'm still puzzled as to why there was a problem using the GUI and
not when R was started from the command line.  In both instances
.libPaths() yields

[1] "/Users/rturner/Rlib"
[2] "/Library/Frameworks/R.framework/Resources/library"

So I would have thought that R would look (first) for MASS in /Users/ 
rturner/Rlib
--- and find the out-of-date version, and hence fall over --- in either
case.  (And the version of R is the same irrespective of startup  
method.)

Be that as it may, the problem is solved.  Thanks again.

	cheers,

		Rolf

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}