Cairo package error: "unable to load..."

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Cairo package error: "unable to load..."

Leonardo Gama
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 <[hidden email]>, Jeffrey Horner <
[hidden email]>
Maintainer: Simon Urbanek <[hidden email]>
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

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Cairo package error: "unable to load..."

Prof Brian Ripley
I presume this about the CRAN binary packages for R and Cairo (from
CRAN, not BioC), in which case you should have asked on R-sig-mac.

But the likely answer is that you forgot to install X11 via XQuartz.
See the 'R Installation and Administration Manual', and if you need more
help, use R-sig-mac.

On 24/07/2014 02:25, Leonardo Gama 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 <[hidden email]>, Jeffrey Horner <
> [hidden email]>
> Maintainer: Simon Urbanek <[hidden email]>
> 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.
>
>
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Cairo package error: "unable to load..."

Simon Urbanek
In reply to this post by Leonardo Gama
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 <[hidden email]> 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 <[hidden email]>, Jeffrey Horner <[hidden email]>
> Maintainer: Simon Urbanek <[hidden email]>
> 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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Cairo package error: "unable to load..."

Simon Urbanek

On Jul 24, 2014, at 12:03 PM, Leonardo Gama <[hidden email]> 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 <[hidden email]>:
> 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 <[hidden email]> 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 <[hidden email]>, Jeffrey Horner <[hidden email]>
> > Maintainer: Simon Urbanek <[hidden email]>
> > 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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.