[R] Build a package on one Mac but unable to load this on another Mac

althu07 althu07 at gmail.com
Sat Oct 18 17:42:10 CEST 2014


Hi, I build a package on one Mac. I can install the package on another Mac
but it cannot be loaded. The following is the error message.

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mypkgfe/libs/mypkgfe.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mypkgfe/libs/mypkgfe.so,
6): Library not loaded: /usr/local/lib/libgfortran.3.dylib
Referenced from:
/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mypkgfe/libs/mypkgfe.so
Reason: image not found
Error: package or namespace load failed for ‘mypkgfe’

If I install the gfortran on the user's Mac, the package can be installed
and loaded successfully. But I don't think this is a good option to solve
this problem as it requires too much on the user's end. Is there anyway to
build the package so that it can be successfully loaded even the Mac
doesn't have gfortran preinstalled?

It seems the Mavericks OS X can load the package but not the Snow Leopard
OS X. I am wondering if this has anything to do with the fact that R for
Snow Leopard doesn't include GNU Fortran.

Thanks!

	[[alternative HTML version deleted]]



More information about the R-help mailing list