[R] Getting R and x11 to work

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jun 6 09:39:24 CEST 2008

On Fri, 6 Jun 2008, Rick Bilonick wrote:

> I'm using Suse Linux Enterprise Desktop 10.2 (SP2) on an HP 2133 (x86)
> mini-notebook. (There apparently are a LOT of bugs in 10.1!) I
> downloaded R-base from the openSuse 10.2 repository and was (finally)
> able to install it (after installing blas and gcc-fortran). I can start
> an R session and do computations. When I try to do any graphics using
> x11, I get the message:
> unable to load shared library '/usr/lib/R/modules//R_X11.so':
> /usr/lib/R/modules//R_X11.so: undefined symbol:
> cairo_image_surface_get_data
> Does anyone have an idea on how to fix this?

Yes, your binary version of R is incompatible with the version of cairo 
you have installed (if you have one).  Really the RPM should have checked 
that, so please report to the maintainer.

Short-term fix: set X11.options(type="Xlib") in the session or in 
.Rprofile via

setHook(packageEvent("grDevices", "onLoad"),
         function(...)  grDevices::X11.options(type="Xlib") )

Longer-term fix: install or update cairo >= 1.2 (and preferably 1.4).

Brian D. Ripley,                  ripley at stats.ox.ac.uk
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

More information about the R-help mailing list