`cairoDevice` installation error on CentOS 7

7 views
Skip to first unread message

Sean Ma

unread,
Jan 4, 2018, 6:24:37 PM1/4/18
to brainGraph-help

Hi Chris, 


I'm reposting my question from Github::issues. 


You mentioned brainGraph was mostly developed on CentOS 6/7. I'm having a hard time trying to get pass the cairoDevice installation in RStudio Server. I have installed GTK 2.24 along with cairo-devel and dependencies on my CentOS 7 but it's still giving me errors below. My Ubuntu 16 didn't have this issue. Any thoughts?

R session is headless; GTK+ not initialized.
(R:25763): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
Error: package or namespace load failed for ‘cairoDevice’:
.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

DH K

unread,
Feb 6, 2018, 7:39:51 PM2/6/18
to brainGraph-help
Hi Sean 

I always same problem as you
I think you can solve the problem if you reset system variable

type on the terminal   

$ env | grep "DISPLAY"

you can check the environment variable

ex.) DISPLAY=localhost:11.0

and then go to Rstudio  set system variable

Sys.setenv("DISPLAY"="localhost:11.0")

In my case, localhost port  number change(ex. 10.0, 15.0 ... )   if I make a new connection to the server
So, I check Linux environment variable (DISPLAY variable) and reset  variable in R studio again when i make a new connection.

Dohyun

2018년 1월 5일 금요일 오전 8시 24분 37초 UTC+9, Sean Ma 님의 말:

Sean Ma

unread,
Feb 7, 2018, 4:14:36 AM2/7/18
to brainGraph-help
Hi Dohyun, 

Thanks for helping out! I will give it a try and report back!

Sean
Reply all
Reply to author
Forward
0 new messages