Hi,
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,
[Unit]
Description=ShinyServer
[Service]
Type=simple
ExecStart=/usr/bin/env bash -c 'exec /opt/shiny-server/bin/shiny-server >> /var/log/shiny-server.log 2>&1'
KillMode=process
ExecReload=/usr/bin/env kill -HUP $MAINPID
ExecStopPost=/usr/bin/env sleep 5
Restart=on-failure
RestartSec=1
Environment="LANG=en_US.UTF-8; R=/home/user/bin/R-4.1.1/bin/R"
StartLimitInterval=45
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
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 http://127.0.0.1:40367
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/Cairo.so':
libtiff.so.4: cannot open shared object file: No such file or directory
136: <Anonymous>
library(Cairo)
works perfectly in the local directory though.