Error installing package glue after reinstalling R

Before I reinstalled R, it can knit normally knit. After reinstalling R, every time I want to knit, I will be asked to install package glue, but every time I get error. I use R on Mac book, sorry I am new to R and mac.

Installing 'glue' for R Markdown...
There is a binary version available but the source version is later:
binary source needs_compilation
glue 1.2.0 1.4.1 TRUE
installing the source package ‘glue’

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 98581 100 98581 0 0 25719 0 0:00:03 0:00:03 --:--:-- 25712
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2020a.1.0/zoneinfo/Pacific/Auckland'

  • installing source package ‘glue’ ...
    ** package ‘glue’ successfully unpacked and MD5 sums checked
    ** libs
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    ERROR: compilation failed for package ‘glue’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/glue’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/glue’
    The downloaded source packages are in

:heavy_check_mark: Package 'glue' successfully installed.
Warning message:
In utils::install.packages("glue", repos = "") :
installation of package ‘glue’ had non-zero exit status

If you need to install packages from source, then you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.

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