Q:

generate png with R

I Installed R-3.0.2 from source on Ubuntu Server 11.10 (sudo ./configure, sudo make) and want to be able to generate png-files (not view them) on the server. When i try to run "png();" in R I get the following Error:

Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width,  :
    unable to start device PNG
  In addition: Warning message:
  In png() : unable to open connection to X11 display ''

Tthe following dependencies are installed:

libpng12-dev (1.2.46)
  java (1.6.0_27)
  xorg-dev (1:7.6+7ubuntu7.1)
  libcairo-dev (1.10.2-6ubuntu3)...

  Update:
  libx11-dev (2:1.4.4-2ubuntu1)
  libxt-dev (1:1.1.1-2)

(could be I forgot some)
Running capabilities(); in R give the following:

jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
      TRUE     TRUE    FALSE    FALSE    FALSE    FALSE     TRUE     TRUE
    libxml     fifo   cledit    iconv      NLS  profmem    cairo
      TRUE     TRUE     TRUE     TRUE     TRUE    FALSE     TRUE

So png is ok, but X11 seems to be missing, any idea's what I need to install/do to get png capability working in R (to get X11 up and running?) ?

A:

Found the answer to my own question thanks to comments from @Spacedman
Turned out I still needed to install the 'libpango1.0-dev' package. "capabilities('X11');" still gives FALSE but "png();" no longer gives errors, so my problem is fixed. Thank you for pointing me in the right direction!

