namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required

Viewed 32718

I'm trying to install the 'lifecycle' package but rlangs is required.

Upon typing install.packages('lifecyle') I get the error that I'm importing a rlangs package which is newer than required ('rlang' 0.4.5 is being loaded, but >= 0.4.10 is required).

  • installing source package 'lifecycle' ...
    ** package 'lifecycle' successfully unpacked and MD5 sums checked
    ** byte-compile and prepare package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
    ERROR: lazy loading failed for package 'lifecycle'
  • removing 'C:/Users/user/R/library/lifecycle' In R CMD INSTALL
    Warning in install.packages : installation of package ‘lifecycle’ had non-zero exit status

I've already uninstalled rlangs and reinstalled it on its own, but it still not working.

Not sure if it helps, but I get the following message beforehand:

There are binary versions available but the source versions are later:
rlang - binary: 0.4.5 - source: 0.4.10 - needs_compilation: TRUE
lifecycle - binary: 0.2.0 - source: 1.0.0 - needs_compilation: FALSE

This error makes little sense and differs from others posts with this kind of error.

2 Answers

First of all: your version is not newer, it's older. 0.4.5 < 0.4.10.

The issue is that for whatever reason the binary version you have access to is of version 0.4.5, but the source version (which needs compiling) is of version 0.4.10.

I believe the simplest solution would be downloading the source package and installing it as source.

install.packages("https://cran.r-project.org/src/contrib/Archive/rlang/rlang_0.4.10.tar.gz", repos = NULL, type="source")

Now, if you don't want the trouble, I belive another possible solution would be updating your R version, which will in turn update the binary versions available for most packages.

Not sure why but it worked for me, close all files in rstudio editor and run in the console:

install.packages("https://cran.r-project.org/src/contrib/Archive/rlang/rlang_0.4.10.tar.gz", repos = NULL, type="source")

Related