Tidyverse fails to install

I am trying to install tidyverse but fails. That's what I do

install.packages("rlang")
install.packages("hms")
install.packages("tidyverse")

library(hms)
library(rlang)
library(tidyverse)

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.4.0 is already loaded, but >= 0.4.5 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 3.6.3

Can you please help ?

To help diagnose your issue:

  • Which line causes the error? Run each line one at a time. When you get an error. Stop.
  • What does sessionInfo() give?

The error message is asking you to update rlang, What output message you get when you run the install command?

install.packages("rlang")

Once I try to install the rlang Rstudio shows me a message of restarting without stop, unless I choose I don't want to restart the session. Here is the errors

install.packages("rlang")
Error in install.packages : Updating loaded packages

Then if I choose without restart I get this:

package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
Warning in install.packages :
problem copying D:\Users\docs\Documents\R\R-3.6.1\library\00LOCK\rlang\libs\x64\rlang.dll to D:\Users\docs\Documents\R\R-3.6.1\library\rlang\libs\x64\rlang.dll: Permission denied
Warning in install.packages :
restored ‘rlang’

I then tried to install "tidyverse" but got the same error I described before.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

Can you please check my answer to Andres ? The sessionInfo() does not show something useful I think, but is says that I have already the rlang is 0.4.0, but not updated version required. So, the problem is why I cannot update this package then.

Close your RStudio session and open again as "administrator", then try installing rlang and see if that works. If not try manually deleting this folder and then try to install again.