Warning in install.packages: unable to move temporary installation

后端 未结 11 2454
孤城傲影
孤城傲影 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:25

    Extending the Sys.sleep value to 3.5 on line 142 in the unpackPkgZip function works manually via

    trace(utils:::unpackPkgZip, edit=TRUE)
    

    However, it can also be done programmatically by running the following before install.packages:

    localUnpackPkgZip <- utils:::unpackPkgZip
    body(localUnpackPkgZip)[[14]][[4]][[4]][[4]][[3]][[3]][[2]][[2]] <- substitute(3.5)
    assignInNamespace("unpackPkgZip", localUnpackPkgZip, "utils")
    

    This must be run every time you have a new session. You can run it multiple times in the same session without issue.

提交回复
热议问题