- Ask IT Support for sudo rights on the shiny server.
Activate persistent logs:
[root@shiny22] # Option einfügen unter zeile 'run_as shiny;' $ vim /etc/shiny-server/shiny-server.conf ... run_as shiny; preserve_logs true; ...
- Examine the log file for errors, for example a missing or an outdated package (an example from SampleSizeR)
$ less /var/log/shiny-server-git/SampleSizeR-shiny-20230420-132522-42355.log ... Error in library(ipc) : there is no package called ‘ipc’ ... Error : package or namespace load failed for ‘plotly’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘vctrs’ 0.6.3 is already loaded, but >= 0.6.4 is required ...
- the missing package exists in Ubuntu repo then it can be intalled directly
$ sudo apt list | grep r-cran-ipc r-cran-vctrs/jammy,now 0.6.4-1cran1.2204.0 amd64 $ sudo apt install r-cran-vctrs
Otherwise it must be installed from within R:$ sudo "R -e \"install.packages('vctrs')\""
- confirm the current version
$ R -q -s -e "packageVersion('vctrs')" [1] ‘0.6.4’
- the missing package exists in Ubuntu repo then it can be intalled directly
- In case of other errors please check the R code
Important: persitent logs create huge log files - deactivate it when finished!