Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error message installing Cairo package in R

Tags:

r

I want to install the Cairo package in R using:

install.packages("Cairo")

Unfortunately this doesn't work. The error message is following:

xlib-backend.c:34:74: fatal error: X11/Intrinsic.h: No such file or directory
compilation terminated.
make: *** [xlib-backend.o] Error 1
ERROR: compilation failed for package ‘Cairo’
* removing ‘/home/magnus/R/x86_64-pc-linux-gnu-library/3.1/Cairo’

Does anybody have an answer for this problem? I couldn't find any help in the internet so far.

Many thanks in advance!

Yours,

broesel

like image 720
Magnus Metz Avatar asked May 13 '14 22:05

Magnus Metz


3 Answers

For me (Ubuntu 15.04) installing libxt-dev solved the problem.

(I know it's mentioned in comments above, but thought it might be good to have it in answers as well)

like image 85
Filip Avatar answered Nov 10 '22 15:11

Filip


You need the development header as the file Intrinsic.h is not found.

For the related package cairoDevice (which I maintain for Debian), I ensure the following is installed:

libgtk2.0-dev, libcairo2-dev, xvfb, xauth, xfonts-base

If you are on a different distribution these might be called something else. The key is that the Gtk and Cairo header packages also pull in other, needed, x11 packages.

like image 21
Dirk Eddelbuettel Avatar answered Nov 10 '22 15:11

Dirk Eddelbuettel


libXt-devel needs to be installed in Fedora (25):

sudo dnf install libXt-devel
like image 10
Jot eN Avatar answered Nov 10 '22 16:11

Jot eN