R shiny / shiny-server - issue with finding packages -


i have installed shiny , shiny-server on ubuntu server. did similar install on dev server working. r sessions when open load packages. app runs fine locally i'm getting messages can't find packages when running on shiny-server.

the error on app

during startup - warning messages:  1: in library(package, lib.loc = lib.loc, character.only = true, logical.return = true,  :   there no package called ‘shiny’ 2: package ‘shiny’ in options("defaultpackages") not found  3: in library(package, lib.loc = lib.loc, character.only = true, logical.return = true,  :   there no package called ‘data.table’ 4: package ‘data.table’ in options("defaultpackages") not found  5: in library(package, lib.loc = lib.loc, character.only = true, logical.return = true,  :   there no package called ‘optirum’ 6: package ‘optirum’ in options("defaultpackages") not found  error in eval(expr, envir, enclos) :    shiny package not found in library. ensure  shiny installed , available in library of  user you're running application as. calls: local -> eval.parent -> eval -> eval -> eval -> eval execution halted 

in rprofile.site have

# ## example of rprofile.site  local({ #  # add mass default packages, set 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 r!\n\n") #    setwd("/home/optimumcredit/r/projects")     sys.umask(mode="0002") } .libpaths(c("/home/r/workingpackages","/home/r/approvedpackages")) 

in shiny-server config have default config (so run shiny , default 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 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 message output libpaths above library(shiny) in code unfortunately same error message happens. did uninstalling , reinstalling i'd bit unusually installed shiny-server first remembered needed shiny no joy. i've confirmed shiny installed in approvedpackages. packages @ load up, added in hopes of circumventing problem or finding out more information.

update - running shiny ah - plot thickens... logging in user shiny on console caused same warnings app getting, , .libpaths() not else's:

> 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'm bit stumped , hoping point me in right direction solve problem.

sorry troubles. can try running following command install shiny system-wide?

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

this comes admin guide (hopefully) serve useful resource on these kinds of issues.

i suspect problem shiny indeed installed in user account, because wasn't installed sudo, it's not available shiny user.

edits:

you'll need make sure rprofile.site being applied when shiny user starts r process. can logging in shiny:

sudo su shiny 

then opening r , checking .libpaths() or seeing if can run library(shiny) there. if you're not able to, there's issue letting shiny user shared packages directory or rprofile.site file (or parent directory). ensure shiny user added necessary groups or these files , of parent directories grant appropriate permissions shiny user.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -