Erro: .onLoad falhou em loadNamespace () para 'cairoDevice' em uma máquina Linux

1

Depois de passar 1 hora procurando a solução, estou postando isso aqui. Alguém sabe como instalar o cairoDevice, pacote em R, Servidor Linux.

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'
    
por user1883491 27.01.2013 / 20:41

1 resposta

0

R testa se o pacote instalado pode ser carregado durante a instalação. Tente instalar o pacote sem carregar o teste, adicionando o sinalizador "--no-test-load" .

R CMD INSTALL --no-test-load cairoDevice_2.19.tar.gz

Ou dentro de R :

install.packages("cairoDevice", INSTALL_opts = "--no-test-load")
    
por 21.09.2015 / 14:32

Tags