tidyverse installation failure

'I'm trying to installl tidyver packege, when i try to run library(tidyverse) i end up getting this error:

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.1.1 is already loaded, but >= 3.3.0 is required.

I have tried to troubleshoot usind this commands

  1. remove.packages("rlang")
  2. Install.packages("rlang")
  3. library(tidyverse)

However, i end up getting the same error. What could be the reason for this?

Thank you

Its cli that needs attention , not rlang.

I have no idea about it, How to go about it?

install.packages("cli")

This is what i'm getting after installing it:
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.1.1 is already loaded, but >= 3.3.0 is required

You would need to restart r so that the most recent versions you installed could load.

I'm getting the same error even after restaring Rstudio

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.1.1 is already loaded, but >= 3.3.0 is required

When you installed cli. Did it give you failure or success messages?

I think It's success massage. This is what I get

package ‘cli’ successfully unpacked and MD5 sums checked

If you restart r studio but have the options to save and restore workspace , this will sabotage your attempt to replace cli. (Because rstudio would load the old cli you dont want before you have the chance to load the preferred one).
Check that your restarts are effective by calling sessionInfo() after and confirming that your todyverse packages etc are not loaded/attached

1 Like

Thank you very much for your kind assistance. It I have solved the issue by repeating the procedure above.

Thank you very much

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.