错误安装包" devtools"在R

时间:2018-03-17 12:27:47

标签: r windows devtools

> install.packages("devtools")

Installing package into ‘C:/Users/hyunj/OneDrive/문서/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘withr’


  There is a binary version available but
  the source version is later:
      binary source needs_compilation
withr  2.1.1  2.1.2             FALSE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/devtools_1.13.5.zip'
Content type 'application/zip' length 443954 bytes (433 KB)
downloaded 433 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\hyunj\AppData\Local\Temp\RtmpayZaSB\downloaded_packages
installing the source package ‘withr’

trying URL 'https://cran.rstudio.com/src/contrib/withr_2.1.2.tar.gz'
Content type 'application/x-gzip' length 53578 bytes (52 KB)
downloaded 52 KB

* installing *source* package 'withr' ...
** package 'withr' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'C:/Users/hyunj/OneDrive/9.<-/R/win-library/3.4/withr/DESCRIPTION': Invalid argument
Error in file(file, if (append) "a" else "w") : 
  cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'withr'
* removing 'C:/Users/hyunj/OneDrive/문서/R/win-library/3.4/withr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\hyunj\OneDrive\문서\R\win-library\3.4" C:\Users\hyunj\AppData\Local\Temp\RtmpayZaSB/downloaded_packages/withr_2.1.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘withr’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\hyunj\AppData\Local\Temp\RtmpayZaSB\downloaded_packages’

1 个答案:

答案 0 :(得分:0)

看起来你有本地化问题。所有本地化问题都难以调试。您的问题似乎可能在您的路径中

 C:/Users/hyunj/OneDrive/문서/R/win-library/3.4 

如果可以更改“문서”部分以获取其他内容,则可能有所帮助。