Problems Installing Packages. Error: "non-zero exit status" and "unknown time zone"

Hi all,

I'm experiencing the same problem for installing various packages, including Tidyverse.

Below is a part of the code when I started seeing error messages after attempting to install "tidyverse". It seems to be a repetitive error message saying that the time zone is unknown and that a function/package is in "non-zero exit status"

I'm using the latest Mac OS and I already tried updating to the newest version of R.

Help would be greatly appreciated!

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2020a.1.0/zoneinfo/America/Chicago'

  • installing source package ‘fansi’ ...
    ** package ‘fansi’ 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 ‘fansi’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/fansi’
    Warning in install.packages :
    installation of package ‘fansi’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2020a.1.0/zoneinfo/America/Chicago'
  • 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’
    Warning in install.packages :
    installation of package ‘glue’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2020a.1.0/zoneinfo/America/Chicago'
  • installing source package ‘rlang’ ...
    ** package ‘rlang’ 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 ‘rlang’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rlang’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rlang’
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2020a.1.0/zoneinfo/America/Chicago'
    ERROR: dependency ‘fansi’ is not available for package ‘cli’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/cli’

Download the XCode App from the app store.

From the terminal:

$ xcode-select --install

From the R app

> install.packages("fansi")

If given the choice to install a newer version from source, respond "no."

Since you are using a very old R version you don't have access to precompiled binaries and you need to compile all packages from source, for that you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.
https://cran.r-project.org/bin/macosx/tools/

I would strongly recommend updating your R version (current version is 4.0.2), that would make things way easier for you.

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