permission denied error while building/checking R package on WIndows

风流意气都作罢 提交于 2019-11-30 08:55:31

I had this problem. I had previously installed the package in question using the command line:

sudo R -e "install.packages('somepackage', repos='http://cran.rstudio.com/')"

Then when I tried building the somepackage package from source I got the permission denied message.

The solution was to run the following from the command line:

sudo R -e "remove.packages('somepackage')"

Then I was able to build and check somepackage from source.

EDIT

I see that the original question was specific to Windows. In that case I think you simply need to run a powershell window as administrator and use the following command:

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