Problems when installing tidyverse

tidyverse
package-installation

#1

Hello,
I have been trying to install tidyverse, but I get the following error: Error in install.packages : cannot open file 'C:/Users/Ruxandra/Documents/R/win-library/3.5/file333c10b6658a/colorspace/CITATION': Permission denied

And it also seems that R is downloading a lot of things and it actually takes some time (it happened very fast when my classmates installed it). I have already uninstalled R and then installed it again, but nothing has changed.

I did however change the default working directory from Options (we were told to set it where we want the files to be saved).
Any suggestions?


#2

Try installing within R (not RStudio) with administrative privilege.

On windows, right click on an R shortcut and select "run as administrator" to launch R. Then try installing again. On linux, run R with sudo R.


#3

Just tried that, it still doesn`t work.
I got this error: Error in unzip(zipname, exdir = dest) :
cannot open file 'C:/Users/Ruxandra/Documents/R/win-library/3.5/file43c4621365


#4

Are you able to install other packages successfully in R with or without using RStudio?


#5

Actually no. I just tried installing ggplot2, both in R and RStudio, but I get an error.
in R: Error in unzip(zipname, exdir = dest) :
cannot open file 'C:/Users/Ruxandra/Documents/R/win-library/3.5/file328ca3b5ec

In RStudio: Error in install.packages : cannot open file 'C:/Users/Ruxandra/Documents/R/win-library/3.5/filea5c2825d2e/glue/DESCRIPTION': Permission denied


#6

This is weird because you shouldn't get Permission denied messages if you have administrative privilege.


#7

I believe some anti-malware software can cause these errors, in which case you may need to whitelist R and/or RStudio in the anti-malware software’s settings, if possible. You could test whether this is the problem by temporarily turning such software off while you try to install, assuming you have the ability to do so (i.e., a personal computer, not a machine administered by an IT department who may prevent you from changing your anti-malware settings).


#8

Yes, that was it. Now it works, thank you very much!


#9

It never even crossed my mind... I am realizing how quick it is to forget about the non linux world once one so happily left it... :slight_smile: Good to know to debug others though.