Hi all,
One of my shiny apps relies on an R package that uses an external library outside of the standard R library search paths.
If I open a standard R session and load the package on my Ubuntu Server (14.04) everything works, the package loads and the functions produce results.
When I tried the same thing via RStudio Server I got this error message:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/gurobi/libs/gurobi.so':
libgurobi65.so: cannot open shared object file: No such file or directoryI was able to resolve this problem by following the recommendation here:
http://www.gurobi.com/documentation/6.5/quickstart_linux/r_installing_the_r_package.htmlIf you are using R from RStudio Server, and you get an error
indicating that R is unable to load the Gurobi DLL or shared object,
you may need to set the rsession-ld-library-path entry in the
server config file. Please consult the RStudio documentation for more
information.
So I set rsession-ld-library-path to the appropriate path and the package works from RStudio Server as well. If I start my Shiny app from within RStudio Server it works too.
If I use Shiny-Server I get the same error message as above (all my other Shiny apps work fine). Now I am wondering if there is an equivalent to
rsession-ld-library-path for Shiny-Server or if I am missing something else here that Shiny is doing?
I have tried adding a library path via my global.R on line 1:
.libPaths(c("/opt/gurobi650/linux64/lib",.libPaths()))
but that didn't do any good either.
Thanks very much for your help,
Richard