[R] Cairo package error: "unable to load..."

Simon Urbanek simon.urbanek at r-project.org
Thu Jul 24 18:05:20 CEST 2014


On Jul 24, 2014, at 12:03 PM, Leonardo Gama <leonardo.gama at usp.br> wrote:

> Sorry, Simon. I should have suspected that it was a trivial problem. But there was an X11 app icon in Applications and I assumed it was installed, but was not. This mensgem only appeared when I clicked on such icon:
> 
> <Screen Shot 2014-07-24 at 11.44.31 AM.png>
> 

Yes, as you can see it says

"X11 is *no longer* included with OS X"
[...]
and it asks you if you want to know how to install it - if you continue, it will point you to a page that says that you have to download it from 

http://xquartz.macosforge.org

It doesn't actually do anything - you have to install it yourself - it just tells you how.

Cheers,
Simon




> Thank you again!
> 
> Leonardo
> 
> 
> 2014-07-24 10:43 GMT-03:00 Simon Urbanek <simon.urbanek at r-project.org>:
> Leonardo,
> 
> you don't have X11 installed and it no longer ships with OS X 10.9 - you need to get it from
> 
> http://xquartz.macosforge.org
> 
> Cheers,
> Simon
> 
> 
> On Jul 23, 2014, at 9:25 PM, Leonardo Gama <leonardo.gama at usp.br> wrote:
> 
> > Hi!
> >
> > I've just installed R on my OS X 10.9 and was trying to make arrayQualityMetrics package work. I've installed it via the biocLite Bioconductor script, and everything was apparently fine. But when I tried to load the package, I've got an issue with the Cairo package...
> >
> > Then I tried to load only Cairo:
> >
> > > library("Cairo")
> >
> > Error : .onLoad failed in loadNamespace() for 'Cairo', details:
> >   call: dyn.load(file, DLLpath = DLLpath, ...)
> >   error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so':
> >   dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so, 6): Library not loaded: /opt/X11/lib/libXrender.1.dylib
> >   Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so
> >   Reason: image not found
> > Error: package or namespace load failed for ‘Cairo’
> >
> > > traceback()
> >
> > 2: stop(gettextf("package or namespace load failed for %s", sQuote(package)),
> >        call. = FALSE, domain = NA)
> > 1: library(Cairo)
> >
> >
> > Verified it version and dependencies:
> >
> > > packageDescription("Cairo")
> >
> > Package: Cairo
> > Version: 1.5-6
> > Title: [...]
> > Author: Simon Urbanek <Simon.Urbanek at r-project.org>, Jeffrey Horner <jeff.horner at vanderbilt.edu>
> > Maintainer: Simon Urbanek <Simon.Urbanek at r-project.org>
> > Depends: R (>= 2.4.0)
> > Suggests: png
> > Enhances: FastRWeb
> > Description: [...]
> > SystemRequirements: cairo (>= 1.2 http://www.cairographics.org/)
> > URL: http://www.rforge.net/Cairo/
> > Packaged: 2014-06-26 14:50:25 UTC; svnuser
> > NeedsCompilation: yes
> > Repository: CRAN
> > Date/Publication: 2014-06-26 17:15:22
> > Built: R 3.1.0; x86_64-apple-darwin13.1.0; 2014-06-27 05:04:27 UTC;
> >         unix
> > -- File: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/Meta/package.rds
> >
> >
> > Tried to update it and got another error/warning:
> >
> > > upgrade.packages("Cairo")
> >
> > Warning message:
> > In doTryCatch(return(expr), name, parentenv, handler) :
> >   unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
> >   dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
> >   Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
> >   Reason: image not found
> >
> > > traceback()
> >
> > No traceback available
> >
> >
> > And finally:
> >
> > > sessionInfo()
> >
> > R version 3.1.1 (2014-07-10)
> > Platform: x86_64-apple-darwin13.1.0 (64-bit)
> >
> > locale:
> > [1] C/UTF-8/C/C/C/C
> >
> > attached base packages:
> > [1] stats     graphics  grDevices utils     datasets  methods   base
> >
> > loaded via a namespace (and not attached):
> > [1] tools_3.1.1
> > > pack
> > packBits               packageEvent           packageSlot            packageStatus
> > package.skeleton       packageHasNamespace    packageSlot<-          packageVersion
> > packageDescription     packageName            packageStartupMessage  package_version
> >
> >
> > I've also verified the cairo.os file cited in the first error message, and it was there:
> >
> > $ file /Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so
> >
> > /Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so: Mach-O 64-bit dynamically linked shared library x86_64
> >
> > $ ls -lh /Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so
> >
> > -rwxrwxr-x  1 root  admin   3.2M Jun 27 02:04 /Library/Frameworks/R.framework/Versions/3.1/Resources/library/Cairo/libs/Cairo.so
> >
> >
> > I have no idea of what's going wrong. Somebody could help me?
> > Thank you, and sorry for the bad English.
> >
> > --
> > Leonardo Gama, acadêmico
> > Ciências Moleculares / Medicina
> > Universidade de São Paulo, Brasil
> 
> 
> 
> 
> -- 
> Leonardo Gama, acadêmico
> Ciências Moleculares / Medicina
> Universidade de São Paulo, Brasil



More information about the R-help mailing list