Custom R binary for shiny-server


I have systemwide R installation which is old. I want to shiny-server to run a custom location of R binary that I installed locally. To create an environment variable as described in the (documentation)[Shiny Server v1.5.16 Configuration Reference] I used the following configuration,


ExecStart=/usr/bin/env bash -c 'exec /opt/shiny-server/bin/shiny-server >> /var/log/shiny-server.log 2>&1'
ExecReload=/usr/bin/env kill -HUP $MAINPID
ExecStopPost=/usr/bin/env sleep 5
Environment="LANG=en_US.UTF-8; R=/home/user/bin/R-4.1.1/bin/R"


Here /home/user/bin/R-4.1.1/bin/R is the custom location of R. While running a sample application I am getting the following error in the log file,

Listening on
Warning: Error in : .onLoad failed in loadNamespace() for 'Cairo', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/usr/local/lib/R/site-library/Cairo/libs/': cannot open shared object file: No such file or directory
  136: <Anonymous>

library(Cairo) works perfectly in the local directory though.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.