I am running Shiny Server Pro v1.5.10.990. I want to run an application which is dependent on the Rcpp package version 1.0.1. I install this package into the local app library. The problem is that there is a global package library on the server that holds the Rcpp package in version 1.0.0. The application crashes with the following error:
Package ‘Rcpp’ version 1.0.0 cannot be unloaded:
Error in unloadNamespace(package) : namespace ‘Rcpp’ is imported by ‘httpuv’, ‘htmltools’, ‘later’, ‘promises’ so cannot be unloaded
Calls: runApp ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
However, Rcpp is the first package that I load in my code. Is it possible that Shiny server is pre-loading the packages ‘httpuv’, ‘htmltools’, ‘later’, ‘promises’? Are there any ideas how I can unload the Rcpp package and load it from the local library?
R_LIBS
before starting it, and R will use the libraries you specify instead of the default ones. – user2554330