Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After spending 1 hour searching for the solution I am posting this here. Does any one know how to install cairoDevice,package on R, Linux Server.

R CMD INSTALL cairoDevice_2.19.tar.gz 
* installing to library 'software/R/R-2.15.2/library'
* installing *source* package 'cairoDevice' ...
** package 'cairoDevice' successfully unpacked and MD5 sums checked
checking for pkg-config... pkg-config
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/software/R/R-2.15.2/include -DNDEBUG -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -g -I/usr/local/include    -fpic  -g -O2  -c cairoDevice.c -o cairoDevice.o
gcc -std=gnu99 -I/users/GR/mb/gbogu/software/R/R-2.15.2/include -DNDEBUG -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -g -I/usr/local/include    -fpic  -g -O2  -c gtk.c -o gtk.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o cairoDevice.so cairoDevice.o gtk.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
installing to software/R/R-2.15.2/library/cairoDevice/libs
** R
** demo
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'cairoDevice', details:
  call: fun(libname, pkgname)
  error: GDK display not found - please make sure X11 is running
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'software/R/R-2.15.2/library/cairoDevice'
* restoring previous 'software/R/R-2.15.2/library/cairoDevice'
share|improve this question

migrated from stackoverflow.com Jan 28 '13 at 7:41

This question came from our site for professional and enthusiast programmers.

    
Probably better to ask this on superuser.stackexchange.com or unix.stackexchange.com –  Sylvain Defresne Jan 27 '13 at 19:38
1  
Just to clarify your question : you are trying to install cairoDevice on a linux server via R in command line (ssh session) ? –  juba Jan 27 '13 at 20:15
add comment

1 Answer

From this post on R-help from Duncan Murdoch, you can skip the loading test when installing a package with :

R CMD INSTALL --no-test-load cairoDevice_2.19.tar.gz 
share|improve this answer
    
yes i did this but still it is saying I need X11 to run –  user1883491 Jan 27 '13 at 20:22
    
And if you add --no-clean-on-error ? –  juba Jan 27 '13 at 20:23
    
It looks like worked but when I try this, this happens > library(cairoDevice) Error : .onLoad failed in loadNamespace() for 'cairoDevice', details: call: fun(libname, pkgname) error: GDK display not found - please make sure X11 is running Error: package/namespace load failed for 'cairoDevice' –  user1883491 Jan 27 '13 at 20:28
    
Ok, if cairoDevice requires X11 to be loaded, you can try to install xvfb and run R with : xvfb-run R. Not certain it will work, though... –  juba Jan 27 '13 at 20:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.