简体   繁体   English

在R中安装闪亮的软件包时出错

[英]Error while installing shiny package in R

This is my code: 这是我的代码:

install.packages("shiny")

Then in the output its showing like this: 然后在输出中显示如下:

Installing package into ‘C:/Users/werd/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘Rcpp’, ‘bitops’, ‘httpuv’, ‘caTools’, ‘RJSONIO’,           ‘xtable’, ‘digest’, ‘htmltools’

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/Rcpp_0.11.2.zip'
Content type 'text/html; charset=UTF-8' length 1600 bytes
opened URL
downloaded 1600 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/bitops_1.0-6.zip'
Content type 'text/html; charset=UTF-8' length 1600 bytes
opened URL
downloaded 1600 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/httpuv_1.3.0.zip'
Content type 'text/html; charset=UTF-8' length 1596 bytes
opened URL
downloaded 1596 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/caTools_1.17.zip'
Content type 'text/html; charset=UTF-8' length 1598 bytes
opened URL
downloaded 1598 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/RJSONIO_1.3-0.zip'
Content type 'text/html; charset=UTF-8' length 1598 bytes
opened URL
downloaded 1598 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/xtable_1.7-3.zip'
Content type 'text/html; charset=UTF-8' length 1600 bytes
opened URL
downloaded 1600 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/digest_0.6.4.zip'
Content type 'text/html; charset=UTF-8' length 1596 bytes
opened URL
downloaded 1596 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/htmltools_0.2.4.zip'
Content type 'text/html; charset=UTF-8' length 1598 bytes
opened URL
downloaded 1598 bytes

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/shiny_0.10.1.zip'
Content type 'text/html; charset=UTF-8' length 1596 bytes
opened URL
downloaded 1596 bytes

Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'Rcpp/DESCRIPTION', probable reason 'No such file or   directory'
Error in install.packages : cannot open the connection

The last part of the output of the program is showing the error. 程序输出的最后一部分显示错误。 I went to the target folder and found that no zip file is downloaded. 我转到目标文件夹,发现没有下载zip文件。 Also, i am having winzip with me. 另外,我和我在一起有winzip。

The last part of output of program is: 程序输出的最后一部分是:

Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'Rcpp/DESCRIPTION', probable reason 'No such file or   directory'
Error in install.packages : cannot open the connection

Kindly help me what to do. 请帮助我该怎么办。

Go Directly to " http://cran.rstudio.com/bin/windows/contrib/3.1/shiny_0.10.1.zip " 直接转到“ http://cran.rstudio.com/bin/windows/contrib/3.1/shiny_0.10.1.zip

Download the file on your laptop/PC . 将文件下载到笔记本电脑/ PC上。

Then run the command: 然后运行命令:

install.packages(shiny_0.10.1.zip, repos=NULL) install.packages(shiny_0.10.1.zip,repos = NULL)

Check these solutions (They are the results of my Googling): 检查以下解决方案(它们是我在Google上搜索的结果):

1. Change your repository to another repositories (domestic repositories are better.) 1.将您的存储库更改为另一个存储库(国内存储库更好。)

2. Just update manipulate: 2.只需更新操作即可:

install.packages("manipulate")

Then: 然后:

install.packages("shiny")
  1. change working directory and try again. 更改工作目录,然后重试。

  2. download manually the shiny package and install with this command: install.packages('D:/shiny_0.11.1.zip', repos = NULL, type = "source") 手动下载闪亮的软件包并使用以下命令安装:install.packages('D:/shiny_0.11.1.zip',repos = NULL,类型=“ source”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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