rlang icon indicating copy to clipboard operation
rlang copied to clipboard

Issues updating rlang in RStudio

Open seandres11 opened this issue 1 year ago • 2 comments

Hello!

I have been having a hard time loading many packages that require rlang in R version 1.4.1

When I load packages which depend on rlang (such at dplyr), the console tells me the following error:

Error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 1.0.5 is already loaded, but >= 1.0.6 is required

I have tried installing with 'dependencies=T' and restarting R, however the problem still persists.

Please let me know if you know of any work arounds for this.

Cheers, Sam

seandres11 avatar Oct 20 '22 02:10 seandres11

What happens when you reinstall rlang?

Usually these problems occur on Windows because R can't replace DLLs of loaded packages on that OS. So whenever you update packages, you need to make sure:

  • That there isn't any other opened sessions of R (RStudio, RGUI, R in the console, etc)
  • That your RProfile doesn't load any packages automatically (use sessionInfo() to check).

Then, start R and update the desired packages in the very first command.

lionel- avatar Oct 20 '22 06:10 lionel-

Try updating with https://github.com/r-lib/pak

lionel- avatar Oct 20 '22 06:10 lionel-

I am having the same problem going from 1.02 to 1.06. It seems that the binaries aren't available - is this right? I haven't used compilation tools and would ideally not start doing but not being able to update rlang is causing me a lot of problems with other packages? I am on a mac using 4.0.2

blueja5 avatar Nov 09 '22 18:11 blueja5

I have also tried pak: pak::pkg_install("rlang") ✓ Loading metadata database ... done

→ Will update 1 package. → The package (742.51 kB) is cached.

  • rlang 1.0.2 → 1.0.6 👷🏻‍♂️🔧 ? Do you want to continue (Y/n) y ℹ No downloads are needed, 1 pkg (742.51 kB) is cached ℹ Building rlang 1.0.6 Error: Could not find tools necessary to compile a package Call pkgbuild::check_build_tools(debug = TRUE) to diagnose the problem. Type .Last.error.trace to see where the error occurred

blueja5 avatar Nov 09 '22 18:11 blueja5

I can see on the CRAN page that binaries have been built for all OSes: https://cran.r-project.org/web/packages/rlang/index.html

What repo are you using? Does your setup have any sort of restrictions?

lionel- avatar Nov 10 '22 06:11 lionel-