Having trouble installing package 'car' on Mac Os 10.14.6 Rstudio Version 1.3.959

Hello,
I am new to R. I have been trying to install package 'car' It is being downloded in some different directory. I tried looking around google on different forums tried installing gcc, fortran, data.tables, etc. suggested as other people but haven't had any luck. I am attaching the code below. I have tried yes, no and cancel. I would really appreciate if you can provide step wise solution. Thanks. :slight_smile:

type or paste code hereinstall.packages('car')
also installing the dependencies ‘tibble’, ‘rlang’, ‘tidyselect’, ‘vctrs’, ‘broom’, ‘dplyr’, ‘pbkrtest’


  There are binary versions available but the source versions are later:
           binary  source needs_compilation
tibble      2.1.3   3.0.5              TRUE
rlang       0.4.5  0.4.10              TRUE
tidyselect  1.0.0   1.1.0             FALSE
vctrs       0.2.4   0.3.6              TRUE
broom       0.5.5   0.7.3             FALSE
dplyr       0.8.5   1.0.3              TRUE
pbkrtest    0.4-7 0.5-0.1             FALSE
car         3.0-7  3.0-10             FALSE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) yes
installing the source packages ‘tibble’, ‘rlang’, ‘tidyselect’, ‘vctrs’, ‘broom’, ‘dplyr’, ‘pbkrtest’, ‘car’

trying URL 'https://cran.rstudio.com/src/contrib/tibble_3.0.5.tar.gz'
Content type 'application/x-gzip' length 548456 bytes (535 KB)
==================================================
downloaded 535 KB

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

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

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

trying URL 'https://cran.rstudio.com/src/contrib/broom_0.7.3.tar.gz'
Content type 'application/x-gzip' length 618499 bytes (604 KB)
==================================================
downloaded 604 KB

trying URL 'https://cran.rstudio.com/src/contrib/dplyr_1.0.3.tar.gz'
Content type 'application/x-gzip' length 946024 bytes (923 KB)
==================================================
downloaded 923 KB

trying URL 'https://cran.rstudio.com/src/contrib/pbkrtest_0.5-0.1.tar.gz'
Content type 'application/x-gzip' length 245668 bytes (239 KB)
==================================================
downloaded 239 KB

trying URL 'https://cran.rstudio.com/src/contrib/car_3.0-10.tar.gz'
Content type 'application/x-gzip' length 501293 bytes (489 KB)
==================================================
downloaded 489 KB

* 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.5/Resources/library/rlang’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rlang’
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ 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 ‘vctrs’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/vctrs’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
* installing *source* package ‘tibble’ ...
** package ‘tibble’ 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 ‘tibble’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tibble’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tibble’
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘rlang’ 0.4.5 is being loaded, but >= 0.4.6 is required
ERROR: lazy loading failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ had non-zero exit status
ERROR: dependency ‘tidyselect’ is not available for package ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status
ERROR: dependency ‘dplyr’ is not available for package ‘broom’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dplyr’ are not available for package ‘pbkrtest’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/pbkrtest’
Warning in install.packages :
  installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependency ‘pbkrtest’ is not available for package ‘car’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/car’
Warning in install.packages :
  installation of package ‘car’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/f2/mwfm67_x385ggh_y3d73chgr2cd__v/T/RtmpeHpboE/downloaded_packages’
> install.packages('car')
also installing the dependencies ‘tibble’, ‘rlang’, ‘tidyselect’, ‘vctrs’, ‘broom’, ‘dplyr’, ‘pbkrtest’


  There are binary versions available but the source versions are later:
           binary  source needs_compilation
tibble      2.1.3   3.0.5              TRUE
rlang       0.4.5  0.4.10              TRUE
tidyselect  1.0.0   1.1.0             FALSE
vctrs       0.2.4   0.3.6              TRUE
broom       0.5.5   0.7.3             FALSE
dplyr       0.8.5   1.0.3              TRUE
pbkrtest    0.4-7 0.5-0.1             FALSE
car         3.0-7  3.0-10             FALSE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) no
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/tibble_2.1.3.tgz'
Content type 'application/x-gzip' length 314770 bytes (307 KB)
==================================================
downloaded 307 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/rlang_0.4.5.tgz'
Content type 'application/x-gzip' length 1171073 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/vctrs_0.2.4.tgz'
Content type 'application/x-gzip' length 1068400 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/dplyr_0.8.5.tgz'
Content type 'application/x-gzip' length 6279091 bytes (6.0 MB)
==================================================
downloaded 6.0 MB


The downloaded binary packages are in
	/var/folders/f2/mwfm67_x385ggh_y3d73chgr2cd__v/T//RtmpeHpboE/downloaded_packages
installing the source packages ‘tidyselect’, ‘broom’, ‘pbkrtest’, ‘car’

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

trying URL 'https://cran.rstudio.com/src/contrib/broom_0.7.3.tar.gz'
Content type 'application/x-gzip' length 618499 bytes (604 KB)
==================================================
downloaded 604 KB

trying URL 'https://cran.rstudio.com/src/contrib/pbkrtest_0.5-0.1.tar.gz'
Content type 'application/x-gzip' length 245668 bytes (239 KB)
==================================================
downloaded 239 KB

trying URL 'https://cran.rstudio.com/src/contrib/car_3.0-10.tar.gz'
Content type 'application/x-gzip' length 501293 bytes (489 KB)
==================================================
downloaded 489 KB

* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘rlang’ 0.4.5 is being loaded, but >= 0.4.6 is required
ERROR: lazy loading failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ had non-zero exit status
* installing *source* package ‘broom’ ...
** package ‘broom’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘dplyr’ 0.8.5 is being loaded, but >= 1.0.0 is required
ERROR: lazy loading failed for package ‘broom’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependency ‘broom’ is not available for package ‘pbkrtest’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/pbkrtest’
Warning in install.packages :
  installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependency ‘pbkrtest’ is not available for package ‘car’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/car’
Warning in install.packages :
  installation of package ‘car’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/f2/mwfm67_x385ggh_y3d73chgr2cd__v/T/RtmpeHpboE/downloaded_packages’
> install.packages('car')
also installing the dependencies ‘rlang’, ‘tidyselect’, ‘vctrs’, ‘dplyr’, ‘tibble’, ‘broom’, ‘pbkrtest’


  There are binary versions available but the source versions are later:
           binary  source needs_compilation
rlang       0.4.5  0.4.10              TRUE
tidyselect  1.0.0   1.1.0             FALSE
vctrs       0.2.4   0.3.6              TRUE
dplyr       0.8.5   1.0.3              TRUE
tibble      2.1.3   3.0.5              TRUE
broom       0.5.5   0.7.3             FALSE
pbkrtest    0.4-7 0.5-0.1             FALSE
car         3.0-7  3.0-10             FALSE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) cancel
Error in install.packages : Cancelled by user
> 

For installing packages from source, you need to install Xcode in your system and the recommended development tools for macOS systems.
https://cran.r-project.org/bin/macosx/tools/

Alternatively, you could update your R version so you can get access to precompiled binaries.

@andresrcs Thank you I will try updating R version and install Xcode Thank you.

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.