Piethon
Piethon

Reputation: 247

Install rlang 1.0.6 but reads as 1.0.2

I recently tried to rerun some old code. When I ran

install.packages('tidyverse')

it came back with the error message:

Error: package or namespace load failed for ‘tidyverse’: .onAttach failed in attachNamespace() for 'tidyverse', details: call: NULL error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 1.0.2 is already loaded, but >= 1.0.6 is required

So I decided to run

remove.packages('rlang')
install.packages('rlang')

which should have updated my package to the latest version. Nope, still on 1.0.2 apparently. So I uninstalled rlang once more, and ran

remotes::install_github('r-lib/rlang')

which should have installed the latest development version of rlang (1.0.6). Indeed, while installing, R mentioned the following:

  • building 'rlang_1.0.6.9000.tar.gz'

So I assumed that it was installing correctly. However, once installed, I tried loading the tidyverse again, and got the SAME error message as before:

Error: package or namespace load failed for ‘tidyverse’: .onAttach failed in attachNamespace() for 'tidyverse', details: call: NULL error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 1.0.2 is already loaded, but >= 1.0.6 is required

sessionInfo() also confirms the worst, I still appear to have 1.0.2 installed. What am I doing wrong???

Upvotes: 0

Views: 2772

Answers (1)

Piethon
Piethon

Reputation: 247

In the end I had to run update.packages(), restart RStudio and then reinstall a couple of packages (cli and xfun) to get everything working again. If anybody encounters this error I'd recommend running update.packages().

Upvotes: 1

Related Questions