R brilliant / brilliant server - packet search problem

I installed a brilliant and brilliant server on an ubuntu server. I did a similar installation on a dev server that works. R when they open the download of some packages. The application works fine locally, but I get messages that it cannot find packages when working on a brilliant server.

Application error

During startup - Warning messages: 1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'shiny' 2: package 'shiny' in options("defaultPackages") was not found 3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'data.table' 4: package 'data.table' in options("defaultPackages") was not found 5: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'optiRum' 6: package 'optiRum' in options("defaultPackages") was not found Error in eval(expr, envir, enclos) : The Shiny package was not found in the library. Ensure that Shiny is installed and is available in the Library of the user you're running this application as. Calls: local -> eval.parent -> eval -> eval -> eval -> eval Execution halted 

In Rprofile.site I have

 # ## Example of Rprofile.site local({ # # add MASS to the default packages, set a CRAN mirror old <- getOption("defaultPackages"); r <- getOption("repos") # r["CRAN"] <- "http://my.local.cran" options(defaultPackages = c(old, "shiny","data.table","optiRum"), repos = r) }) .First <- function() { cat("\n Welcome to R!\n\n") # setwd("/home/OPTIMUMCREDIT/R/Projects") Sys.umask(mode="0002") } .libPaths(c("/home/R/WorkingPackages","/home/R/ApprovedPackages")) 

In the shiny-server configuration, I only have the default configuration (so run it as a brilliant and standard port).

My sessionInfo ()

 > sessionInfo() R version 3.0.3 (2014-03-06) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C LC_PAPER=C [8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_0.9.3.1 scales_0.2.3 RCurl_1.95-4.1 bitops_1.0-6 rstudio_0.98.501 optiRum_0.30 data.table_1.9.2 shiny_0.8.0 loaded via a namespace (and not attached): [1] MASS_7.3-29 RColorBrewer_1.0-5 RJSONIO_1.0-3 Rcpp_0.11.0 caTools_1.16 colorspace_1.2-4 dichromat_2.0-0 [8] digest_0.6.4 grid_3.0.3 gtable_0.1.2 httpuv_1.2.3 labeling_0.2 munsell_0.4.2 plyr_1.8.1 [15] proto_0.3-10 reshape2_1.2.2 stringr_0.6.2 tools_3.0.3 xtable_1.7-3 

I tried adding a message to output libPaths above library(shiny) in my code, but unfortunately the same error message is occurring. I uninstalled and reinstalled a bit, since I installed the brilliant server a bit unusual and then remembered that I needed a brilliant, but without joy. I have confirmed that brilliant is installed in ApprovedPackages. Packages at boot time, I added in the hope of getting around the problem or finding out more information.

UPDATE - works like a brilliant Ah - the plot thickens ... logging in with a user who is brilliant on the console caused the same warnings as the application, and .libPaths () is not like everyone else:

 > sessionInfo() R version 3.0.3 (2014-03-06) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base > .libPaths() [1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" [3] "/usr/lib/R/library" 

I am a bit at a standstill and was hoping that someone could point me in the right direction to solve the problem.

+7
r shiny shiny-server
source share
1 answer

Sorry for the trouble. Can you try the following command to install a system-wide Shiny?

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

This comes from the admin guide , which (hopefully) will serve as a useful resource on these issues.

I suspect that the problem is that Shiny is indeed correctly installed in your user account, but since it was not installed as sudo, it is not accessible to the shiny user.

Changes:

You also need to make sure that Rprofile.site is applied when the shiny user starts the R process. You can do this by logging in as shiny :

 sudo su shiny 

Then open R and check .libPaths() or see if you can run library(shiny) successfully. If you are not able, there might be a problem giving the shiny user access to your shared packages directory or to your Rprofile.site file (or its parent directory). Make sure that the shiny user is added to the desired groups or these files and that all their parent directories provide the appropriate permissions to the shiny user.

+13
source share

All Articles