System configuration

I am wondering why am I getting the following error every time when I try to install any packages in R 3.4.2?

unable to move temporary installation ‘C:\Users\rgautam\Documents\R\win-library\3.4\file4d0c204e6adc\magrittr’ to ‘C:\Users\rgautam\Documents\R\win-library\3.4\magrittr’

it eventually not letting to install any packages in R 3.4.2.

Please note that I am using Windows 10, R 3.4.2 and Rstudio 1.1.383.

Any idea how to fix this?


Do you have any antivirus running? This SO answer suggests that may be the issue:

Yeah, I have Mcafee Antivirus. I don't know if this is the issue. Then, why doesn't it affect R 3.2.5 but R 3.4.2?

Can you try temporarily disabling McAfee to see if that solves the problem? Or is this a corporate system that you don't have access to do so? If you can, it will at least confirm or eliminate that as the source of the issue.