[R-SIG-Mac] R.app Packages file to load: Cannot find library objects

Gregory Sawyer gdsawyer at greatergood.com
Fri Jun 19 23:48:34 CEST 2015


> On Jun 19, 2015, at 1:10 PM, David Winsemius <dwinsemius at comcast.net> wrote:
> 
> If you installed the frameworks version of R 3.2, then R should be looking for the package library in 
> 
>   /Library/Frameworks/R.framework/Versions/3.2/Resources/
> 
> How did you migrate you packages to 3.2. The usual method is to make copies and move them to the 3.2 .../library/ directory and then execute:
> 
>   update.packages(checkBuilt-TRUE, # and I usually need to do this because I have a lot of packages
>                   ask=FALSE)  # the default is TRUE
> 
> What does this show?
> 
>   .libPaths()
> 
> It should show at least this:
> 
> 1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"
> 
> ... but if you have a User/.../library then that will also appear
> 
> On Jun 19, 2015, at 11:20 AM, Gregory Sawyer wrote:
> 
>> Hello,
>> 
>> I’m having a problem with R 3.2 on the Mac under R.app, and the Internets have failed to provide an answer, so I was wondering if there might be someone here that can help me.
>> 
>> Whenever I try to load a package I get the following error:
>> 
>>> library(dplyr)
>> Error in dyn.load(file, DLLpath = DLLpath, ...) : 
>> unable to load shared object '/Library/Frameworks/R.framework/PackageLib/dplyr/libs/dplyr.so':
>> dlopen(/Library/Frameworks/R.framework/PackageLib/dplyr/libs/dplyr.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
>> Referenced from: /Library/Frameworks/R.framework/PackageLib/dplyr/libs/dplyr.so
>> Reason: image not found
>> Error: package or namespace load failed for ‘dplyr’
>> 
>> (1)	The specific library referenced in the dlopen() function may differ — here it is libR.dylib, but for markovchain it’s libgfortran.
>> 
>> (2)	I’m running (just installed) R 3.2.1 World Famous Astronaut, but this happened with 3.2.0 as well;
>> 		Mac OS 10.10.3
>> 		32 GB Core
>> 
>> (3)	This only happens using R.app.  Everything works fine when I fire up R in R-Studio or at the command line.
>> 
>> (4)	I have noted that it seems to be trying to access the 3.1 Resources.  There are some 3.1 things out in /Library/Frameworks/R.framework, but all the major directories, particularly those that are links, appear to be pointing to 3.2.  I don’t know how to tell R.app that we’ve moved on in life and need to be looking in the new neighborhood.
>> 
>> 
>> Thanks,
>> 
>> —Gregory
>> 
>> Gregory D. Sawyer
>> Sr. Data Architect (Business Intelligence)
>> GreaterGood.com <http://greatergood.com/> <http://greatergood.com/ <http://greatergood.com/>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org <mailto:R-SIG-Mac at r-project.org>
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac <https://stat.ethz.ch/mailman/listinfo/r-sig-mac>
> 
> David Winsemius
> Alameda, CA, USA

Thank you, David, executing the update.packages() command seems to have cured it.

This was perplexing because it only failed in the R.app, and not in R Studio or the command line R — since I mainly use R Studio, I didn’t really notice the R.app behavior.  

—Gregory


	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list