Unable to download dplyr

I'm just starting to use RStudio and I seem to be unable to install dplyr. I can install other packages just fine. When I try to install dplyr it says "There are binary versions available but the source versions are later: " and asks me y/n if I "want to install from sources the packages which need compilation?" It then asks me y/n if I "want to attempt to install these from sources?" Everything goes fine when I run it until this eventually comes up

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

As I said before I have virtually no clue what I'm doing so any help would be appreciated. Thanks

Have you tried installing this dependencies first?

install.packages(c("fansi", "vctrs")) 

I tried to install fansi and vctrs, but it failed again. When installing I got the messages:

Do you want to install from sources the packages which need compilation?
y/n: y
Packages which are only available in source form, and may need
  compilation of C/C++/Fortran: ‘vctrs’ ‘fansi’
Do you want to attempt to install these from sources?
y/n:

and

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/New_York'

and

ERROR: compilation failed 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

It looks like R can't compile the necessary packages as R says itself

Are you posting the whole error message?, it seems like you are omitting some parts that could be useful.
Also, if you don't need the latest version of this packages you could install the binary version and avoid compiling.

Sorry I wasn't. That would probably be helpful. Here's the full original error message when I tried to download dplyr

> install.packages("dplyr")
also installing the dependencies ‘vctrs’, ‘fansi’, ‘pillar’, ‘glue’, ‘Rcpp’, ‘rlang’, ‘tibble’, ‘tidyselect’


  There are binary versions available but the source versions are
  later:
            binary source needs_compilation
pillar       1.0.1  1.4.1             FALSE
glue         1.2.0  1.3.1              TRUE
Rcpp       0.12.14  1.0.1              TRUE
rlang        0.1.6  0.3.4              TRUE
tibble       1.3.4  2.1.3              TRUE
tidyselect   0.2.3  0.2.5              TRUE
dplyr        0.7.4  0.8.1              TRUE

Do you want to install from sources the packages which need compilation?
y/n: y
Packages which are only available in source form, and may need
  compilation of C/C++/Fortran: ‘vctrs’ ‘fansi’
Do you want to attempt to install these from sources?
y/n: y
installing the source packages ‘vctrs’, ‘fansi’, ‘pillar’, ‘glue’, ‘Rcpp’, ‘rlang’, ‘tibble’, ‘tidyselect’, ‘dplyr’

trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.1.0.tar.gz'
Content type 'application/x-gzip' length 412633 bytes (402 KB)
==================================================
downloaded 402 KB

trying URL 'https://cran.rstudio.com/src/contrib/fansi_0.4.0.tar.gz'
Content type 'application/x-gzip' length 266123 bytes (259 KB)
==================================================
downloaded 259 KB

trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.4.1.tar.gz'
Content type 'application/x-gzip' length 228572 bytes (223 KB)
==================================================
downloaded 223 KB

trying URL 'https://cran.rstudio.com/src/contrib/glue_1.3.1.tar.gz'
Content type 'application/x-gzip' length 122950 bytes (120 KB)
==================================================
downloaded 120 KB

trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.1.tar.gz'
Content type 'application/x-gzip' length 3661123 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.3.4.tar.gz'
Content type 'application/x-gzip' length 858992 bytes (838 KB)
==================================================
downloaded 838 KB

trying URL 'https://cran.rstudio.com/src/contrib/tibble_2.1.3.tar.gz'
Content type 'application/x-gzip' length 310774 bytes (303 KB)
==================================================
downloaded 303 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_0.2.5.tar.gz'
Content type 'application/x-gzip' length 21883 bytes (21 KB)
==================================================
downloaded 21 KB

trying URL 'https://cran.rstudio.com/src/contrib/dplyr_0.8.1.tar.gz'
Content type 'application/x-gzip' length 1170671 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/New_York'
* installing *source* package ‘fansi’ ...
** package ‘fansi’ successfully unpacked and MD5 sums checked
** libs


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


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/New_York'
* installing *source* package ‘glue’ ...
** package ‘glue’ successfully unpacked and MD5 sums checked
** libs


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


ERROR: compilation failed for package ‘glue’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/glue’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/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/2019a.1.0/zoneinfo/America/New_York'
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’
Warning in install.packages :
  installation of package ‘Rcpp’ 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/New_York'
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** libs


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


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/New_York'
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** libs


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


ERROR: compilation failed 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/New_York'
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** libs


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


ERROR: compilation failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/tidyselect’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ 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/New_York'
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/New_York'
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/New_York'
ERROR: dependency ‘tibble’ is not available for package ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/rx/ckv4frn166jdhlp8_ypm6qdc0000gn/T/RtmpR9y1q3/downloaded_packages’

Also when I try it without compiling it still doesn't work.

 install.packages("dplyr")
also installing the dependencies ‘vctrs’, ‘fansi’, ‘pillar’, ‘glue’, ‘Rcpp’, ‘rlang’, ‘tibble’, ‘tidyselect’


  There are binary versions available but the source versions are
  later:
            binary source needs_compilation
pillar       1.0.1  1.4.1             FALSE
glue         1.2.0  1.3.1              TRUE
Rcpp       0.12.14  1.0.1              TRUE
rlang        0.1.6  0.3.4              TRUE
tibble       1.3.4  2.1.3              TRUE
tidyselect   0.2.3  0.2.5              TRUE
dplyr        0.7.4  0.8.1              TRUE

Do you want to install from sources the packages which need compilation?
y/n: n
Packages which are only available in source form, and may need
  compilation of C/C++/Fortran: ‘vctrs’ ‘fansi’
Do you want to attempt to install these from sources?
y/n: n
trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/glue_1.2.0.tgz'
Content type 'application/x-gzip' length 56062 bytes (54 KB)
==================================================
downloaded 54 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/Rcpp_0.12.14.tgz'
Content type 'application/x-gzip' length 4091831 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/rlang_0.1.6.tgz'
Content type 'application/x-gzip' length 459607 bytes (448 KB)
==================================================
downloaded 448 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/tibble_1.3.4.tgz'
Content type 'application/x-gzip' length 351939 bytes (343 KB)
==================================================
downloaded 343 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/tidyselect_0.2.3.tgz'
Content type 'application/x-gzip' length 277424 bytes (270 KB)
==================================================
downloaded 270 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/dplyr_0.7.4.tgz'
Content type 'application/x-gzip' length 6006175 bytes (5.7 MB)
==================================================
downloaded 5.7 MB


The downloaded binary packages are in
	/var/folders/rx/ckv4frn166jdhlp8_ypm6qdc0000gn/T//RtmpR9y1q3/downloaded_packages
installing the source package ‘pillar’

trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.4.1.tar.gz'
Content type 'application/x-gzip' length 228572 bytes (223 KB)
==================================================
downloaded 223 KB

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

The downloaded source packages are in
	‘/private/var/folders/rx/ckv4frn166jdhlp8_ypm6qdc0000gn/T/RtmpR9y1q3/downloaded_packages

I think this might be the key, I don't use Mac OS, so I don't know exactly how permissions work on this OS but it seems like you need to run RStudio with super user privileges.

You would have to install the missing dependencies first (also without compiling).

Unfortunately I can't install the dependencies without compiling.

> install.packages("fansi")
Package which is only available in source form, and may need
  compilation of C/C++/Fortran: ‘fansi’
Do you want to attempt to install these from sources?
y/n: n

And then nothing happens after I say no. Is there some other way I could install the packages? Another source perhaps?

For any source that requieres compilation you are going to need make Xcode to work, so maybe you wan to dig more into that, hopefully some Mac OS user here would be able to give you better help with this.

You're right. I just realized my Xcode isn't working and needs to be updated. That's almost certainly it

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