"cannot move temporary installation" when installing dependency packages in R

When I install a package, prerequisite packages are installed before the actual package. I get a warning "unable to move temporary installation"for all packages of the required conditions, but there is no such warning for the actual package. But the package will throw an error when loading.

For example, when I install.packages("mlr"), he installed all the dependencies, and I received various warnings, such as:

package ‘BBmisc’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  unable to move temporary installation ‘D:\Documents\R\win-library\3.2\filef3811142c73\BBmisc’ to ‘D:\Documents\R\win-library\3.2\BBmisc’

I ignored this because it is just a warning. Unfortunately, he library(mlr)gave it to me Error: package ‘BBmisc’ required by ‘mlr’ could not be found, so I could not ignore it.

install.packages("BBmisc") did not directly issue a warning.

What gives? How can I work through this without installing all the dependencies myself?

If necessary, information about the session is needed:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_Singapore.1252  LC_CTYPE=English_Singapore.1252   
[3] LC_MONETARY=English_Singapore.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Singapore.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.2.2
+4
source share
3 answers

This problem is caused by an antivirus (most likely), as suggested by user 3710546. If you cannot disable the antivirus, a workaround is to enable debugging in the package unpacking functions using this command:

debug(utils:::unpackPkgZip).

This will allow you to go through the code (by repeatedly pressing the enter key). It just makes the function run slower, giving antivirus software time to finish scanning new files before R wants to copy them.

I found this solution here .

+13
source

Windows 10: ​​ .

  • "" /.
  • .
  • : install.packages( "shiny", destdir = "./", lib = "./" )
  • - , zips .
  • : httpuv.zip shiny.zip
  • httpuv zip httpuv.
  • Restarted R studio . () , ..!!!
+2

. Windows 7 , .. . :

  • Delete R and RStudio
  • Delete all files (including hidden) that are associated with R
  • Install R and RStudio as Administrator
  • Launch RStudio as an Administrator

The only drawback is the warning when starting RStudio (works as admin). All updates and installations work great.

0
source

Source: https://habr.com/ru/post/1623896/


All Articles