Error installing ggplot2 - Error : object ‘enexprs’ is not exported by 'namespace:rlang' ERROR: lazy loading failed for package ‘ggplot2’


I am trying to install ggplot2, but it doesn't work. I got these following error messages:

Error : object ‘enexprs’ is not exported by 'namespace:rlang'
ERROR: lazy loading failed for package ‘ggplot2’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ggplot2’
    Warning in install.packages :
    installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in

Can anyone help me ?
(I am a beginner in R).

Did you try:

Error : object ‘enexprs’ is not exported by 'namespace:rlang'

Install the rlang package:


Install any missing packages. Then restart RStudio.

1 Like

Try this...

    install.packages("tidyverse", dependencies = TRUE)

or if you just want ggplot

    install.packages("ggplot2", dependencies = TRUE)

Did you have any success with any of the suggestions so far?

One thing I'm noticing is you appear to be running a fairly old version of R (3.3 — the current release is R 3.5). When running old versions of R, it can get harder and harder to install the latest versions of packages. Have you tried updating to a more recent version of R? You seem to be on Mac OS X, so see here: (Note that if you do upgrade to a newer version of R, the installer will make a new library by default and you will need to re-install your packages)


thank you for all of your responses. Install.packages ("rlang") solved my problems. (I thought I have tried this idea before).

Ok i will update my R version.

1 Like

If your question's been answered (even if by you), would you mind choosing a solution? (See FAQ below for how).

Having questions checked as resolved makes it a bit easier to navigate the site visually and see which threads still need help.


2 posts were split to a new topic: Installing ggplot2: “not a valid package” error (Windows, R 3.3)

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