Failed to lock directory when installing R package using devtools::install_github()

﹥>﹥吖頭↗ 提交于 2019-11-28 10:18:18

问题


When installing an R package from GitHub using devtools::install_github(), the following error was returned:

ERROR: failed to lock directory ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’ for modifying
Try removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/00LOCK-jrosen48-prcr-4f6f783’

When I navigate using Terminal on Macintosh OS 10.12 to that location, it is not available ( R.framework did not appear in the "Frameworks" directory).

How can I try removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/00LOCK-jrosen48-prcr-4f6f783’? Or, is there another workaround for this?


回答1:


Try removing /Library/Frameworks/R.framework/Versions/3.3/Resources/library/00LOCK-jrosen48-prcr-4f6f783

Remove using rm command from your command line:

:$ rm -rf /Library/Frameworks/R.framework/Versions/3.3/Resources/library/00LOCK-jrosen48-prcr-4f6f783

Then install the package again.



来源:https://stackoverflow.com/questions/41143608/failed-to-lock-directory-when-installing-r-package-using-devtoolsinstall-githu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!