On RedHat7.9: capabilities() reports FALSE on RStudio but reports TRUE on R server

On RedHat7.9 server (64bit), recently I installed R4.0.4 server and RStudio server 1.4.1106 , capabilities() returns TRUE from R command (putty) , but returns FALSE from RStudio web, any idea why ?

I appreciate your insight and prompt reply.

Could anyone help ? I really appreciate !

How did you install R? Did you compile from source, use our RPMs, use EPEL, or something else?

What is the full output of capabilities() in the two environments? Normally it returns not only a single value but a (named) vector of booleans.

Thanks for the reply rstub !

I installed R from source (by downloading the tar.gz, and configure, then make, etc.).

  1. From R (via Putty), the output is:
> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua
       TRUE        TRUE        TRUE        TRUE        TRUE       FALSE
   http/ftp     sockets      libxml        fifo      cledit       iconv
       TRUE        TRUE        TRUE        TRUE       FALSE        TRUE
        NLS     profmem       cairo         ICU long.double     libcurl
       TRUE       FALSE       FALSE        TRUE        TRUE        TRUE
>
  1. From RStudio web, the output is:
> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua    http/ftp     sockets      libxml        fifo 
      FALSE       FALSE       FALSE        TRUE       FALSE       FALSE        TRUE        TRUE        TRUE        TRUE 
     cledit       iconv         NLS     profmem       cairo         ICU long.double     libcurl 
      FALSE        TRUE        TRUE       FALSE       FALSE        TRUE        TRUE        TRUE 
>

I appreciate your help!

Ok, so the differences are X11 (expected) and jpeg/png/tiff (unexpected). Where are these libraries installed on your system? is LD_LIBRARAY_PATH different for the two environments?

Hi rsub,

Here is what I found:
On R console:

Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/lib64/R/lib:/usr/local/lib64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/jre/lib/amd64/server::/usr/lib64/openmpi/lib/"

On RStudio :

Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/lib64/R/lib::/lib:/usr/local/lib64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/jre/lib/amd64/server"

The only difference is /usr/lib64/openmpi/lib/ miss in LD_LIBRARY_PATH for RStudio, but even after I added it to rserver.conf, the capabilities() still reports FALSE as it used to.

Any thoughts to solve it ?

Re-inspecting your capabilities() output I have noticed that your R installation does not support cairo. However:

The ‘modern’ version of the X11(), jpeg(), png() and tiff() graphics devices uses the cairo and (optionally) Pango libraries. Cairo version 1.2.0 or later is required.
R Installation and Administration

So my suggestion would be to either re-build R with the development packages for cairo installed, or use our pre-compiled binaries.