在Windows机器上install_github失败

时间:2018-09-22 14:39:52

标签: r rstudio devtools

我有一个大学课程的学生,她无法使用RStudio从github安装课程包,这是她的sessioninfo:

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1    yaml_2.2.0

这是安装命令的输出:

> install_github("ScPoEcon/ScPoEconometrics")
Downloading GitHub repo ScPoEcon/ScPoEconometrics@master
from URL https://api.github.com/repos/ScPoEcon/ScPoEconometrics/zipball/master
Installing ScPoEconometrics
"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/cbuzy/AppData/Local/Temp/Rtmpa2Rw7x/devtools7e043f65f74/ScPoEcon-ScPoEconometrics-5553b41"  \
  --library="C:/Users/cbuzy/Documents/R/win-library/3.5" --install-tests 
* installing *source* package 'ScPoEconometrics' ...
Warning in file.copy(instdir, lockdir, recursive = TRUE, copy.date = TRUE) :
  problème lors de la copie de C:\Users\cbuzy\Documents\R\win-library\3.5\ScPoEconometrics\CITATION vers C:\Users\cbuzy\Documents\R\win-library\3.5\00LOCK-ScPoEcon-ScPoEconometrics-5553b41\ScPoEconometrics\CITATION: Permission denied
Warning in file.copy(instdir, lockdir, recursive = TRUE, copy.date = TRUE) :
  problème lors de la copie de C:\Users\cbuzy\Documents\R\win-library\3.5\ScPoEconometrics\datasets\corr50.csv vers C:\Users\cbuzy\Documents\R\win-library\3.5\00LOCK-ScPoEcon-ScPoEconometrics-5553b41\ScPoEconometrics\datasets\corr50.csv: Permission denied

...等,用于安装中的所有文件。以

结尾
Warning in file(file, if (append) "a" else "w") :
  impossible d'ouvrir le fichier 'C:/Users/cbuzy/Documents/R/win-library/3.5/ScPoEconometrics/DESCRIPTION' : Permission denied
Error in file(file, if (append) "a" else "w") : 
  impossible d'ouvrir la connexion
ERROR: installing package DESCRIPTION failed for package 'ScPoEconometrics'
* removing 'C:/Users/cbuzy/Documents/R/win-library/3.5/ScPoEconometrics'
* restoring previous 'C:/Users/cbuzy/Documents/R/win-library/3.5/ScPoEconometrics'
In R CMD INSTALL
Installation failed: Command failed (1)
建议在某些时候

删除引用的锁定文件。完成此操作后,R变得非常疯狂(甚至是GUI),因此没有用。我了解有权限问题。该如何解决?

0 个答案:

没有答案