Error installing packages for R version 3.6.2

Hello - I keep getting an error trying to install the package ggtext.

Warning in install.packages :
package ‘ggtext’ is not available (for R version 3.6.2).

I'm not sure what I'm doing wrong or whether there is a workaround. Thanks!

Welcome, @annier. The ggtext package is not yet avaiable on CRAN, so for now you can install it from GitHub by running:


Hello! And many thanks for your suggestion. I tried it and got this error message:

  • installing source package ‘ggtext’ ...
    ** using staged installation
    ** R
    ** byte-compile and prepare package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    namespace ‘ggplot2’ 3.2.1 is being loaded, but >= 3.3.0 is required
    Calls: ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
    Execution halted
    ERROR: lazy loading failed for package ‘ggtext’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ggtext’
    Error: Failed to install 'ggtext' from GitHub:
    (converted from warning) installation of package ‘/var/folders/9s/1rv6k3h92tq3df43xc3cx3m80000gn/T//RtmpipXcvs/file155533eaa8a3/ggtext_0.1.0.tar.gz’ had non-zero exit status

Take a look at the error message. It says:

namespace ‘ggplot2’ 3.2.1 is being loaded, but >= 3.3.0 is required

Have you tried upgrading ggplot2? You could do this by running install.packages("ggplot2"). After that, try to reinstall ggtext.

Thanks! This worked.

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

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