Warning in install.packages: unable to move temporary installation

后端 未结 11 2475
孤城傲影
孤城傲影 2020-12-05 05:00

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:

  • Co
11条回答
  •  被撕碎了的回忆
    2020-12-05 05:11

    If you cannot turn off your antivirus here is a workaround that I found that doesn't involve editing the unpackPkgZip file. Debugging the unzip package function and then stepping through it gives the antivirus enough time to do its job without interfering. Use this command:

    debug(utils:::unpackPkgZip) install.packages("packageName")

    and then step through the code (by pressing enter many times) when R starts debugging during the installation.

    I found this solution here.

    If you want to make this change more permanent you can add the debug code into your Rprofile file, see here, but you'll still need to use step through the unzip function each time a package is installed.

提交回复
热议问题