Installing package - cannot open file - permission denied
I had the same issue. Tried doing the following and worked for me:
- Run the RStudio as administrator
- Under the
Packages
tab, clickInstall
and changeInstall to Library
option toC:/Program...../R/../library
and select the desired package to install.
Hope it works.
I had the same issue. Try running R or R studio as administrator. That resolved it for me.
I had the same problem. R gave me an error message whenever I tried to install a new, or update an existing package. I don't remember what the message said exactly, but it was saying "Cannot open file (...) access denied". I tried all the following. Not sure what exactly fixed the problem, but now I can update and/or install new packages:
- Open R/RStudio as administrator;
- Change the R library folder (where packages are installed) security settings, and grant full access to my computer user account. Link1, link2;
- (I think this was what fixed the problem) Follow instructions on this link. It prompted me to install another package, "devtools". Then it worked.