Not able to install tidyverse package

if i run this command

install.packages("tidyverse")

also installing the dependencies ‘callr’, ‘reprex’


  There are binary versions available but the source versions are later:
          binary source needs_compilation
callr      1.0.0  2.0.2             FALSE
tidyverse  1.1.1  1.2.1             FALSE

installing the source packages ‘callr’, ‘reprex’, ‘tidyverse’



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

The downloaded source packages are in
	‘/private/var/folders/vd/sg_5r71n2cd2133kn1w2jsvm0000gn/T/RtmpfaQKdM/downloaded_packages’

this will come so what should i do now ?
i am using

platform       x86_64-apple-darwin13.4.0   
arch           x86_64                      
os             darwin13.4.0                
system         x86_64, darwin13.4.0        
status                                     
major          3                           
minor          3.3                         
year           2017                        
month          03                          
day            06                          
svn rev        72310                       
language       R                           
version.string R version 3.3.3 (2017-03-06)
nickname       Another Canoe               

Looks like either you haven't installed the Command Line Tools from Apple (R needs the compilers to build some packages from source), or less likely, you already did and they're in a location not listed in $PATH.

If it's the former, open a terminal and enter xcode-select --install, which should do the trick. Note that you don't need to install all of XCode (which is enormous), just the Command Line Tools. You can also get them from the Apple Developer website, but you may need to sign up for an account.

3 Likes

thanks,it is working after installing command line tools @alistaire