Warning in install.packages() on Mac OSx 10.13

I have tried installing package car on my Macbook and have followed the threads on here and spent hours online looking for solutions. I have tried manual install in R, auto install on R-studio, tried changing the mirror site, installed many extras as many of the threads talked about. (fortran, ggplot, ggplot2, data.table... ) Prof spent a while with me... no avail. and still I get this error:

Warning in install.packages : installation of package ‘rio’ had non-zero exit status
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Vancouver'
ERROR: dependency ‘rio’ is not available for package ‘car’

  • removing ‘/Users/HomeMBAir/Library/R/3.2/library/car’
install.packages("rio")

works on Mojave. If given a choice to install a later version from source, decline. Whenever you see "non-zero exit status" on OSX it almost always means a compilation error from source. OSX has compiler work chains that don't always play well with standards. Sometimes it works to install from source, sometimes not. Thanks to Saint Simon Urbanek, it always works to install the binary.

1 Like

Out of curiosity, which version of R are you using? The issue that came up with using MacOS X High Sierra and info on timezones has been resolved in R 3.4.3. See changes in R with news().

The error message you're seeing is that the the installation of rio from source
is unable to find the .../timezone/tz/2018i.1.0/zoneinfo directory in MacOS X.

There are couple of other possible workarounds in addition to what @technocrat mentioned.

  1. Update the version of R you're using.

  2. Add a line in the .Rprofile file in your home directory to include
    Sys.setenv(TZ = "America/Vancouver") to set a working timezone for each R session.

2 Likes

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.