.onLoad failed in loadNamespace() for 'rlang'

I'm trying to install ggplot2 in my renv project environment. ggplot2 is installed in my user library and works fine outside of the renv. I was able to install other packages (e.g. stringr) into my renv environment. The problem seems to be with rlang and/or vctrs.

Error:
installing to ~/renv/library/R-4.0/x86_64-pc-linux-gnu/00LOCK-vctrs/00new/vctrs/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'rlang', details:
call: NULL
error: 'is_character' is not an exported object from 'namespace:rlang'
Execution halted
ERROR: lazy loading failed for package ‘vctrs’

  • removing ‘~/renv/library/R-4.0/x86_64-pc-linux-gnu/vctrs’

The downloaded source packages are in
‘/tmp/RtmpANmOTQ/downloaded_packages’
Warning message:
In utils::install.packages(pkgs, ...) :
installation of package ‘vctrs’ had non-zero exit status

OS: Ubuntu (Debian) Version 21.04
RStudio: Version 1.4.1717
R: Version 4.0.4

I've tried the following:
Restarting R session (many times)
Closing and re-opening RStudio
Restart computer
install.packages("vctrs", repos="https://packagemanager.rstudio.com/cran/latest/src/contrib/PACKAGES")
I've uninstalled and reinstalled rlang

I was able to resolve the problem. For some reason some of the packages within the project's renv had not properly updated. After updating and restarting the session the packages installed without further issue.

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.