Error in instaling ggplot2 on rstudio 1.2.1335 on a macOS Mojave version 10.14.5

I have tried to install ggplot 2 and I keep on having this error message. Been trying to fix it but haven't gotten anywhere
this is the error I get

installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/39/5cdr_fq9089953l821tv14rc0000gn/T/Rtmp7MOCVI/downloaded_packages’

You are omitting the useful parts of the message, cloud you post the whole error message?

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

  • 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.3/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/2019a.1.0/zoneinfo/America/Detroit'
  • 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.3/Resources/library/rlang’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/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/2019a.1.0/zoneinfo/America/Detroit'
  • installing source package ‘ellipsis’ ...
    ** package ‘ellipsis’ 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 ‘ellipsis’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ellipsis’
    Warning in install.packages :
    installation of package ‘ellipsis’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependency ‘ellipsis’ is not available for package ‘vctrs’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/vctrs’
    Warning in install.packages :
    installation of package ‘vctrs’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependencies ‘fansi’, ‘vctrs’ are not available for package ‘pillar’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/pillar’
    Warning in install.packages :
    installation of package ‘pillar’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependencies ‘fansi’, ‘pillar’ are not available for package ‘tibble’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/tibble’
    Warning in install.packages :
    installation of package ‘tibble’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependency ‘tibble’ is not available 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
‘/private/var/folders/39/5cdr_fq9089953l821tv14rc0000gn/T/Rtmp7MOCVI/downloaded_packages’

Do you have xcode installed in your system? You need it for compiling packages on MacOS

xcode-select --install

Here are some installation instructions

thank you I did instal it and tried getting the packages I still get the same error messages and I cannot seem to instal ggplot2

Are you getting the exact same error message? because this part suggests that you don't have xcode properly installed in your system.

Hello,
I'm a newbie to R and I have been trying to install the package ggplot 2. I keep on getting the error "had non zero exit status". I looked at all the advice but still have not been able to fix it. I'm using Rstudio version 1.2.1335 on a macbook OS mojave 10.14.5 . Belows is the error messages I get,
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'

  • 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.3/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/2019a.1.0/zoneinfo/America/Detroit'
  • 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.3/Resources/library/rlang’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/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/2019a.1.0/zoneinfo/America/Detroit'
  • installing source package ‘ellipsis’ ...
    ** package ‘ellipsis’ 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 ‘ellipsis’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ellipsis’
    Warning in install.packages :
    installation of package ‘ellipsis’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependency ‘ellipsis’ is not available for package ‘vctrs’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/vctrs’
    Warning in install.packages :
    installation of package ‘vctrs’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependencies ‘fansi’, ‘vctrs’ are not available for package ‘pillar’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/pillar’
    Warning in install.packages :
    installation of package ‘pillar’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependencies ‘fansi’, ‘pillar’ are not available for package ‘tibble’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/tibble’
    Warning in install.packages :
    installation of package ‘tibble’ had non-zero exit status
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Detroit'
    ERROR: dependency ‘tibble’ is not available 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
‘/private/var/folders/39/5cdr_fq9089953l821tv14rc0000gn/T/Rtmp7MOCVI/downloaded_packages’

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