title: shiny server an error has occured load namespace no package rcpp but rcpp is installed and loading shiny in R works
body: <p>I was recently trying to open a shiny server app on my server and got this error which I have never seen before.</p>
  
  <pre><code>   Error in loadNamespace(j &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck     = vI[[j]]) : 
        there is no package called ‘Rcpp’
      Error: package or namespace load failed for ‘shiny’
      Execution halted
  </code></pre>
  
  <p>I am assuming an update broke something. However when starting R on my machine both <code>library(shiny)</code> as well as <code>library(Rcpp)</code> load without any issues. </p>
  
  <p>So I tried re-installing shiny-server. According to their instructions <a href="http://www.rstudio.com/products/shiny/download-server/" rel="nofollow">here</a>, however I basically get the same error as above:</p>
  
  <pre><code>sudo su - \
  &gt; -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 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.
  
  &gt; install.packages('shiny', repos='http://cran.rstudio.com/')
  Installing package into â/usr/local/lib/R/site-libraryâ
  (as âlibâ is 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â successfully unpacked and MD5 sums checked
  ** R
  ** inst
  ** preparing package for lazy loading
  Error in loadNamespace(j &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
    there is no package called âRcppâ
  ERROR: lazy loading failed for package âshinyâ
  * removing â/usr/local/lib/R/site-library/shinyâ
  * restoring previous â/usr/local/lib/R/site-library/shinyâ
  
  The downloaded source packages are 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
  </code></pre>
  
  <p>I have no idea why this is, since both shiny and Rcpp install and load flawlessy when just starting R or even when starting R as sudo. </p>
  
  <p>My <code>sessionInfo()</code> output is: </p>
  
  <pre><code>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 a 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
  </code></pre>
  
  <p>Thanks in advance for any pointers or help.</p>