简体   繁体   中英

Trouble installing shiny dependencies on ubtuntu 12.04 to host apps on shiny-server.

When I go to my app address for a simple histogram app I get the following error:

An error has occurred

The application failed to start.

The application exited during initialization.

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

So I try to reinstall the shiny package and I get this message which I am having trouble interpreting into the next course of action. Maybe I need to be explicit about install dependencies?

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

R version 3.1.0 RC (2014-04-05 r65382) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages('shiny', repos='http://cran.rstudio.com/')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘Rcpp’, ‘httpuv’

trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.1.tar.gz'
Content type 'application/x-gzip' length 2003515 bytes (1.9 Mb)
opened URL
==================================================
downloaded 1.9 Mb

trying URL 'http://cran.rstudio.com/src/contrib/httpuv_1.3.0.tar.gz'
Content type 'application/x-gzip' length 423739 bytes (413 Kb)
opened URL
==================================================
downloaded 413 Kb

trying URL 'http://cran.rstudio.com/src/contrib/shiny_0.9.1.tar.gz'
Content type 'application/x-gzip' length 958658 bytes (936 Kb)
opened URL
==================================================
downloaded 936 Kb

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -g  -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -g  -c Module.cpp -o Module.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -g  -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -g  -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -g  -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -g  -c barrier.cpp -o barrier.o
g++ -shared -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/Rcpp/libs
** R
** inst
** preparing package for lazy loading
Error : package ‘codetools’ was built before R 3.0.0: please re-install it
Error : unable to load R code in package ‘Rcpp’
ERROR: lazy loading failed for package ‘Rcpp’
* removing ‘/usr/local/lib/R/site-library/Rcpp’
ERROR: dependency ‘Rcpp’ is not available for package ‘httpuv’
* removing ‘/usr/local/lib/R/site-library/httpuv’
ERROR: dependency ‘httpuv’ is not available for package ‘shiny’
* removing ‘/usr/local/lib/R/site-library/shiny’

The downloaded source packages are in
    ‘/tmp/RtmpRLRUsk/downloaded_packages’
Warning messages:
1: In install.packages("shiny", repos = "http://cran.rstudio.com/") :
  installation of package ‘Rcpp’ had non-zero exit status
2: In install.packages("shiny", repos = "http://cran.rstudio.com/") :
  installation of package ‘httpuv’ had non-zero exit status
3: In install.packages("shiny", repos = "http://cran.rstudio.com/") :
  installation of package ‘shiny’ had non-zero exit status

After installing the codetools package according to jdharrison's advice, I retried installing shiny and then stated that I needed to reinstall RJSONIO. I then installed RJSONIO and tried installing shiny again. Now it is asking me for package caTools. When I install caTools it asks for bittops. I then try installing caTools again and it needs package digest. I install that, try shiny again and it asks for xtable. I install xtable and now shiny installs! now shiny server is working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM