I've found a number of questions related to this warning when installing or updating packages in R/RStudio, but none seem to completely match my situation:
- Corporate Windows 7 system, so no access to admin privileges
- No way to make changes to McAfee Anti-Virus exceptions lists
- R is fully installed in the user space
C:Users[myname]R
- RStudio fully installed in userspace
CUsers[myname]RStudio
- no permission issues in either of the directories... I have full access control over them
- Problem only started after installing R 3.4, but RStudio has randomly failing at start or hanging for a few months now
R_LIBS_USER
added as user environment variable, pointing to right directory.libPaths()
show correct directories, both system and user- R version 3.4.2, RStudio version 1.0.153
- Uninstalled both R and Rstudio and did a clean re-install of both
- Tried
trace(utils:::unpackPkgZip,edit = T)
and edited Line 140Sys.sleep(0.5)
toSys.sleep(2)
, which sometimes works temporarily but the edit won't stay put... resets toSys.sleep(0.5)
on every session restart - Happens in both RStudio and RGui
Any package larger than a few Kb gives the message:
package ‘packagename’ successfully unpacked and MD5 sums checked Warning in install.packages : unable to move temporary installation ‘C:Users[myname]Rwin-library3.4file2b884fc37c13packagename’ to ‘C:Users[myname]Rwin-library3.4packagename’
The packages are failing to install or update. So, my questions are:
- is there a way to avoid the problem altogether that doesn't require admin privileges or changes to the antivirus policies?
- is there a way to get the edit to
unpackPkgZip
to save permanently?
At this point, I'm stumped. I suspect it has something to do with the antivirus temporarily locking the file/directory after download, but I can't do anything about it from that end. The Sys.sleep(2)
seems to do the trick, but I can't keep doing that before every package install or update and can't seem to get the edit to stay put.