Shiny-server open source

I have shiny-server running on an ubuntu 22.04 (jammy jellyfish) server with the 'hello' and 'rmd' sample-apps working correctly as expected. I've created a 'gislayerfinder' directory containing an 'app.R' file but when I try to run the app with:

http://my-ip-address:3838/sample-apps/gislayerfinder/

server-page-error

I get the following 'rpostgis' error in the log file

I'm not sure whether the app must be in the form of a 'ui.R' and a 'server.R' files or I can use an 'app.R' file. I am also sure that maybe 'RStudio-server' should be running on port 3838 instead of port 8787?.

Hope someone can spot what is going wrong.

Many thanks,.

since other libraries would seem to load first and not error out killing your app in the way rpostgis does, I would take that error message at face value, that there is no such package installed for that environment, whereas the others have been installed

Both forms are valid so you can choose whatever you like the most.

rstudio-server is an independent service not required by shiny-server, it should run in its own port, you should not use the same port for two different services.

Your app folder should be located within the /srv/shiny-server/folder but not necessarily within the sample apps folder.

I think your problem is that the required packages for your app are not installed in the system-level package library, all packages used within your app must be executable by the shiny user. A simple way to overcome this issue is installing your packages as sudo from a system terminal. For example

sudo su - -c "R -e \"install.packages('rpostgis', repos='http://cran.rstudio.com/')\""

Thank you all who responded. It turned out that some of the libraries such as 'gdal' were required to be installed and some other library dependencies were missing and had to be re-installed. Eventually all dependencies were satisfied and it worked.

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.