ODBC issues on RConnect

I use the ODBC package to develop an Shiny app which runs fine on RStudio Online.

then I try to deploy it on our internal instance of RConnect, I get this error

unable to load shared object '/opt/rstudio-connect/mnt/packrat/4.0.3/v2/library/odbc/1fa16c2d82b39184818570103dd40fae/odbc/libs/odbc.so'

When building the ODBC Driver string (to SQL Server) I have used this alias {ODBC Driver 17 for SQL Server} it looks like this alias points to the above .so file on RConnect but it isn't allowing it work.

Is it an admin issue? Can the admin just somehow allow access to the folder then it should work?

When starting an ODBC connection one typically loads the odbc R package. And loading that means that the R process needs to dyn-load to corresponding .so file. This is the file that fails to load here. One typical reason would be that odbc.so is linked against some library that does not exist on the machine, most likely the ones from unixodbc. Do you know if the corresponding packages have been installed on the server?

You can get the required packages if you go to RStudio Package Manager you can adjust the operating system in the upper right-hand corner. For example on Ubuntu, you need

apt-get install -y make
apt-get install -y unixodbc-dev

but this will depend on the exact OS. [Actually the above is more than needed, but it does not hurt to install this super-set of necessary pacakges.]