Created
December 7, 2017 18:05
-
-
Save alexpawlowski/51cf147b10fe2468691b264d6e920fda to your computer and use it in GitHub Desktop.
Command to make your antivirus happy when installing new R packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Typically this happens when you're on a work machine with McAfee with zero power to 'disable it'. The issue of course, is when you update your `R` packages, McAfee (and probably others) lock the temporary file that R uses in unzipping the downloaded folder of the package you are installing. | |
The first method is to just keep trying the install command (I find this handy for large lists of packages, like when you update `tidyverse`) some packages will fail to be moved, but some will get through! | |
When you get down to `Rcpp` and the last stragglers, you'll need to slow your roll, son. | |
To do so, use this command: [Source](http://r.789695.n4.nabble.com/unable-to-move-temporary-installation-td4521714.html#a4529846) | |
```R | |
debug(utils:::unpackPkgZip) | |
``` | |
Have fun exercising your num pad (`Enter` | `Return`) key as you roll through the debug of unpacking your package installs. | |
When you're done (and save yourself from `Enter` hell), undo it with this: | |
```R | |
undebug(utils:::unpackPkgZip) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment