我无法使用devtools或直接从tar.gz文件在R中安装软件包

时间:2018-10-26 10:57:38

标签: r installation package repository

最近,我一直无法安装当前未在CRAN中列出的软件包,方法是使用devtools从github页面直接下载它,或者使用tar.gz文件。我总是遇到相同的错误,这是这些行:

    Installing package into ‘C:/Users/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)
    * installing *source* package 'rbcb' ...
    ** package 'rbcb' successfully unpacked and MD5 sums checked
    Warning in file(file, if (append) "a" else "w") :
    cannot open file 'C:/Users/Documents/R/win- 
    library/3.5/rbcb/DESCRIPTION': No such file or directory
    Error in file(file, if (append) "a" else "w") : 
    cannot open the connection
    ERROR: installing package DESCRIPTION failed for package 'rbcb'
    * removing 'C:/Users/Documents/R/win-library/3.5/rbcb'
    In R CMD INSTALL
    Warning message:
    In install.packages("C:/Users/Downloads/rbcb_0.1.5.tar.gz",  :
    installation of package ‘C:/Users/Downloads/rbcb_0.1.5.tar.gz’ had non- 
    zero exit status

使用devtools时出现类似错误

    devtools::install_github('wilsonfreitas/rbcb')
    Downloading GitHub repo wilsonfreitas/rbcb@master
    from URL https://api.github.com/repos/wilsonfreitas/rbcb/zipball/master
    Installing rbcb
    "C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save  
    \--no-restore --quiet CMD INSTALL  \  



  "C:/Users/AppData/Local/Temp/RtmpYXAtfa/devtools1e702535224f/wilsonfreitas-rbcb-b70fb09"  \
  --library="C:/Users/Documents/R/win-library/3.5" --install-tests 

* installing *source* package 'rbcb' ...
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'C:/Users/Documents/R/win-library/3.5/rbcb/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") : 
  cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'rbcb'
* removing 'C:/Users/Documents/R/win-library/3.5/rbcb'
In R CMD INSTALL
Installation failed: Command failed (1)

0 个答案:

没有答案