[Rd] unpackPkgZip: "unable to move temporary installation" due to antivirus

Tomas Kalibera tomas.kalibera at gmail.com
Thu Sep 21 12:20:54 CEST 2017


This windows/anti-virus problem has been worked around in R-devel 73329.
Thanks to Mike for reporting this and testing the changes.

Best
Tomas

On 09/13/2017 01:40 AM, Mike Toews wrote:
> Hi,
>
> Me and an office colleague on Microsoft Windows 10 PCs are having
> difficulty installing any package. This is a recent issue for us, and
> we suspect our McAfee antivirus has modified by our IT department.
> Let's take, for example, install.packages("mypackage"), here is the
> output:
>
> package ‘mypackage’ successfully unpacked and MD5 sums checked
> Warning in install.packages :
>    unable to move temporary installation
> ‘C:\Users\mtoews\Documents\R\win-library\3.3\file382064842da2\mypackage’
> to ‘C:\Users\mtoews\Documents\R\win-library\3.3\mypackage’
>
> Debugging, I found the issue around here:
> https://github.com/wch/r-source/blob/980c15af89d99c04e09a40708512a57c49d1c6ee/src/library/utils/R/windows/install.packages.R#L173-L174
>> ## To avoid anti-virus interference, wait a little
>> Sys.sleep(0.5)
> As indicated by an answer
> (https://stackoverflow.com/a/44256437/327026), debugging slows down
> the function to allow the package to be installed. A simple fix is to
> increase the sleep time to a time that is longer than 0.5 seconds.
> (I've tried testing new times, but I can't seem to overload this
> function). Or use a different strategy, such as using a few attempts
> with increasing wait times, or using a custom unlink function.
>
> Happy to help out or test more on this issue. Also, if any R Core
> member could add me to R's Bugzilla members, that would be convenient
> for me.
>
> Cheers,
> Mike
>
> R version 3.3.3 (2017-03-06) -- "Another Canoe"
> Copyright (C) 2017 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list