[R-SIG-Mac] packages failed to load

Carl Witthoft carl at witthoft.com
Tue May 24 13:40:55 CEST 2011


Just wanted to mention that I saw the same behavior with a package or 
two, and found the same workaround (copying libs to the 2.12 tree).

Carl

<quote>
Message: 4
Date: Tue, 24 May 2011 16:32:41 +1000
From: Ian Reeve <ireeve at une.edu.au>
To: "r-sig-mac at r-project.org" <r-sig-mac at r-project.org>
Subject: [R-SIG-Mac] Packages deldir,	class and gpclib fail to load in
	R 2.13.0
Message-ID: <23292B0B-0329-454C-9A17-5BB1CCB45337 at une.edu.au>
Content-Type: text/plain; charset="us-ascii"

Hi,

I've been running rgdal, RColorBrewer, maptools, classInt, spdep, 
gpclib, raster, zoo, cluster and lattice in R2.12 on Mac OSX 10.6.7 for 
the last 6 months with no problems.  Today I installed R 2.13.0, and 
downloaded the latest versions of the above packages.  Most of them load 
without problems, but class (a depend of classInt), and deldir (a depend 
of spdep) failed to load.  The error message is of the form:

-------------------------------
Loading required package: class
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object 
'/Library/Frameworks/R.framework/Versions/2.13/Resources/library/class/libs/x86_64/class.so':
 
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/class/libs/x86_64/class.so, 
6): Library not loaded: 
/Library/Frameworks/R.framework/Versions/2.12/Resources/lib/libR.dylib
   Referenced from: 
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/class/libs/x86_64/class.so
   Reason: image not found
Error: package 'class' could not be loaded
-------------------------------

The problem seems to be either the package is looking in the wrong place 
(a subdirectory of 2.12 instead of a subdirectory of 2.13) for the file 
libR.dylib, or the install of R failed to put the files that package 
class needs in the 2.12 directory.  In the case of deldir, the errant 
file is libgfortran.2.dylib.

I can get  package class to load without error by taking a copy of 
libR.dylib from the subdirectory of 2.13 and putting it in the 
subdirectory of 2.12 where class  expects it to be.

I'm concerned this might be a stupid short-term fix, as calls to the 
functions in class might also fail due to other files not being in the 
expected places.

Can anyone suggest any leads to other approaches I could take to get 
these previously trouble-free packages to behave themselves in R 2.13?

Thank you.

Ian Reeve

Institute for Rural Futures
University of New England
Armidale, NSW 2351



More information about the R-SIG-Mac mailing list