问题
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