R-Studio包安装错误

时间:2017-11-26 19:31:32

标签: r rstudio

我正在尝试在R-Studio中安装和读取不同的软件包,每次都会遇到同样的错误。我不确定是什么导致了这个问题,如果有人可以提供一些有关此问题的见解,我将不胜感激。以下是错误消息:

install.packages("dplyr")

Installing package into ‘C:/Users/eliew/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘bindr’, ‘assertthat’, ‘bindrcpp’, ‘glue’, ‘magrittr’, ‘pkgconfig’, ‘rlang’, ‘R6’, ‘Rcpp’, ‘tibble’, ‘BH’, ‘plogr’


trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/dplyr_0.7.4.zip'
Content type 'application/zip' length 2885453 bytes (2.8 MB)
downloaded 2.8 MB

package ‘bindr’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c6b34a6c\bindr’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\bindr’

package ‘assertthat’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c389f2e27\assertthat’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\assertthat’

package ‘bindrcpp’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c4c4a15af\bindrcpp’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\bindrcpp’

package ‘glue’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c2f503588\glue’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\glue’

package ‘magrittr’ successfully unpacked and MD5 sums checked

package ‘pkgconfig’ successfully unpacked and MD5 sums checked

package ‘rlang’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c7f6e32c9\rlang’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\rlang’

package ‘R6’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c3b3c3540\R6’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\R6’
package ‘Rcpp’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c6f642de\Rcpp’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\Rcpp’

package ‘tibble’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c326d2efb\tibble’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\tibble’

package ‘BH’ successfully unpacked and MD5 sums checked

package ‘plogr’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c697ff4d\plogr’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\plogr’

package ‘dplyr’ successfully unpacked and MD5 sums checked

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\eliew\Documents\R\win-library\3.4\file316c1ea2f5b\dplyr’ to ‘C:\Users\eliew\Documents\R\win-library\3.4\dplyr’

The downloaded binary packages are in
    C:\Users\eliew\AppData\Local\Temp\RtmpWkewty\downloaded_packages

 library("dplyr")

Error in library("dplyr") : there is no package called ‘dplyr’

3 个答案:

答案 0 :(得分:1)

我遇到了同样的问题。要解决此添加行跟踪(utils ::: unpackPkgZip,edit = TRUE) 然后将行从源Sys.sleep(0.5)更改为Sys.sleep(2.5)。点击保存 请参阅:http://rampradeeppakalapati.blogspot.com/2018/02/r-studio-warning-unable-to-move.html

答案 1 :(得分:0)

在Windows上,必须以管理员模式运行RStudio才能在默认的R子目录中安装软件包。要在管理员模式下运行RStudio,请右键单击Windows中的RStudio图标,然后从弹出菜单中选择以管理员身份运行

答案 2 :(得分:0)

当我按照@Thomas的建议并在我的~Documents / R / win-library / 3.4文件夹的属性中取消选中“只读”时,这个问题就解决了。