ubuntu - shiny server an error has occured load namespace no package rcpp but rcpp is installed and loading shiny in R works -
i trying open shiny server app on server , got error have never seen before.
error in loadnamespace(j <- i[[1l]], c(lib.loc, .libpaths()), versioncheck = vi[[j]]) : there no package called ‘rcpp’ error: package or namespace load failed ‘shiny’ execution halted i assuming update broke something. when starting r on machine both library(shiny) library(rcpp) load without issues.
so tried re-installing shiny-server. according instructions here, same error above:
sudo su - \ > -c "r -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\"" r version 3.2.1 (2015-06-18) -- "world-famous astronaut" copyright (c) 2015 r foundation statistical computing platform: x86_64-pc-linux-gnu (64-bit) r free software , comes absolutely no warranty. welcome redistribute under conditions. type 'license()' or 'licence()' distribution details. natural language support running in english locale r collaborative project many contributors. type 'contributors()' more information , 'citation()' on how cite r or r packages in publications. type 'demo()' demos, 'help()' on-line help, or 'help.start()' html browser interface help. type 'q()' quit r. > install.packages('shiny', repos='http://cran.rstudio.com/') installing package â/usr/local/lib/r/site-libraryâ (as âlibâ unspecified) trying url 'http://cran.rstudio.com/src/contrib/shiny_0.12.1.tar.gz' content type 'application/x-gzip' length 1473559 bytes (1.4 mb) ================================================== downloaded 1.4 mb * installing *source* package âshinyâ ... ** package âshinyâ unpacked , md5 sums checked ** r ** inst ** preparing package lazy loading error in loadnamespace(j <- i[[1l]], c(lib.loc, .libpaths()), versioncheck = vi[[j]]) : there no package called ârcppâ error: lazy loading failed package âshinyâ * removing â/usr/local/lib/r/site-library/shinyâ * restoring previous â/usr/local/lib/r/site-library/shinyâ downloaded source packages in â/tmp/rtmpufc19u/downloaded_packagesâ warning message: in install.packages("shiny", repos = "http://cran.rstudio.com/") : installation of package âshinyâ had non-zero exit status i have no idea why is, since both shiny , rcpp install , load flawlessy when starting r or when starting r sudo.
my sessioninfo() output is:
r version 3.2.1 (2015-06-18) platform: x86_64-pc-linux-gnu (64-bit) running under: ubuntu precise (12.04.5 lts) locale: [1] lc_ctype=en_us.utf-8 lc_numeric=c [3] lc_time=en_us.utf-8 lc_collate=en_us.utf-8 [5] lc_monetary=en_us.utf-8 lc_messages=en_us.utf-8 [7] lc_paper=en_us.utf-8 lc_name=c [9] lc_address=c lc_telephone=c [11] lc_measurement=en_us.utf-8 lc_identification=c attached base packages: [1] stats graphics grdevices utils datasets methods base other attached packages: [1] shiny_0.12.1 rcpp_0.11.6 loaded via namespace (and not attached): [1] r6_2.0.1 htmltools_0.2.6 digest_0.6.8 xtable_1.7-4 [5] httpuv_1.3.2 mime_0.3 thanks in advance pointers or help.
apparently, library/permissions issue. still bit foggy on r package managment , possible different library locations (certainly when working rstudio server , shiny server , bioconductor etc.) , when or not use sudo install packages. guidelines on have avoided question.
the code suggested people @ rstudio (sudo su -\ -c "r -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\"") got me thinking: when run r in terminal or sudo r library(rcpp) , library(shiny) work did sudo su , ran r interactively install.packages('shiny', repos='http://cran.rstudio.com/'). showed apparently root user (su) rcpp package not installed (!). after manually installing package re-install shiny , shiny app started working again.
what concerns me still how rcpp package "dissappeared" in first place root r packages. cannot remember removing myself , find rather unpleasant behavior if update have caused this.
either way: issue resolved. maybe answer can others similar issue.
Comments
Post a Comment