Search code examples
rcentos7cairoshiny-server

Error while attempting to install Cairo R package on centos 7 server


I already installed cairo-devel in the server. When I attempt the following line:

sudo su - -c "R -e \"install.packages('Cairo', repos='http://cran.rstudio.com/')\""

I get a bunch of output, but the most pertinent ones are the following:

img-backend.c:82:13: warning: ‘image_save_page_jpg’ defined but not used [-Wunused-function]
 static void image_save_page_jpg(Rcairo_backend* be, int pageno){
             ^
img-backend.c:96:13: warning: ‘image_save_page_tiff’ defined but not used [-Wunused-function]
 static void image_save_page_tiff(Rcairo_backend* be, int pageno){
             ^

xlib-backend.c:34:74: fatal error: X11/Intrinsic.h: No such file or directory
 #include <X11/Intrinsic.h>      /*->    Xlib.h  Xutil.h Xresource.h .. */
                                                                          ^
compilation terminated.
make: *** [xlib-backend.o] Error 1
ERROR: compilation failed for package ‘Cairo’
* removing ‘/usr/lib64/R/library/Cairo’

How would I fix this?


Solution

  • I had to install libXt-devel.

    sudo yum install libXt-devel