我根据https://github.com/rstudio/shiny-server/wiki/Ubuntu-step-by-step-install-instructions安装了闪亮的
并在步骤中遇到相同的错误
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
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
我通过启动 R 尝试了 Richard Lee 的答案
R
并得到了错误
Warning in install.packages("shiny") :
'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (y/n) n
Error in install.packages("shiny") : unable to install packages
显然没有写权限,所以
sudo R
现在我又试了
install.packages("shiny")
并得到了一些错误
Error : package ‘codetools’ was built before R 3.0.0: please re-install it
Error : package ‘RJSONIO’ was built before R 3.0.0: please re-install it
Error : package ‘caTools’ was built before R 3.0.0: please re-install it
Error : package ‘bitops’ was built before R 3.0.0: please re-install it
Error : package ‘digest’ was built before R 3.0.0: please re-install it
Error : package ‘xtable’ was built before R 3.0.0: please re-install it
每次出现错误时,我都会重新安装请求的软件包
install.packages("codetools")
install.packages("RJSONIO")
etc.
最终,我能够安装 Rccp、httpuv,甚至是闪亮的。现在它起作用了!
另请参阅
R 版本 3.0.2“Frisbee Sailing”上的 Shiny 包安装