今天笔记本电脑装包反反复复出现下面错误:
Error in install.packages : ERROR: failed to lock directory ‘D:\Tool\R_Library’ for modifying
Try removing ‘D:\Tool\R_Library/00LOCK’
尝试下解决方案:
install.packages("Rcpp", dependencies = TRUE, INSTALL_opts = '--no-lock')
把 Rcpp
改成要装的包名。
不行的话把报错文件删了:
unlink("D:/Tool/R_Library/00LOCK", recursive = TRUE)
参考:https://stackoverflow.com/questions/14382209/r-install-packages-returns-failed-to-create-lock-directory[1]
[1]https://stackoverflow.com/questions/14382209/r-install-packages-returns-failed-to-create-lock-directory: https://stackoverflow.com/questions/14382209/r-install-packages-returns-failed-to-create-lock-directory