[R] xvfb? cron job updates R packages, fails on some requiring X11

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jan 19 18:01:21 CET 2017


On 19/01/2017 11:52 AM, Paul Johnson wrote:
> In Centos 7 systems, I wrote a script that runs on the cron and I
> notice some package updates and installs fail like this:
>
>
> Error : .onLoad failed in loadNamespace() for 'iplots', details:
>   call: .jnew("org/rosuda/iplots/Framework")
>   error: java.awt.HeadlessException:
> No X11 DISPLAY variable was set, but this program performed an
> operation which requires it.
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing ‘/usr/share/R/library/iplots’
> * restoring previous ‘/usr/share/R/library/iplots’
>
>
> I can log in interactively and run  the same install successfully.
>
> I understand I need something like xvfb to simulate an X11 session,
> but I don't understand how to make it work.  Can one of you give me an
> idiot's guide on what to do?
>
> pj
>
>

I don't know if iplots offers this, but a package should be able to work 
in a non-X11 environment.  rgl does it by checking the RGL_USE_NULL 
environment variable.

Duncan Murdoch



More information about the R-help mailing list