Hi guys,
First time to learn RStudio, I am running Version 1.2.5033 at Mac ios, having trouble to install a package. I tried to reinstall R but still have the same issue "installation of package ‘Rcpp’ had non-zero exit status". I have no idea how to fix it since I am beginner. Any suggestions would be a huge help, many thanks!
> install.packages("dplyr")
also installing the dependency ‘Rcpp’
There is a binary version available but the source version is later:
binary source needs_compilation
Rcpp 1.0.4 1.0.4.6 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/dplyr_0.8.5.tgz'
Content type 'application/x-gzip' length 6859111 bytes (6.5 MB)
==================================================
downloaded 6.5 MB
The downloaded binary packages are in
/var/folders/jj/f_lyv6zd44jfhb75572cw_cc0000gn/T//RtmplzQDYx/downloaded_packages
installing the source package ‘Rcpp’
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.4.6.tar.gz'
Content type 'application/x-gzip' length 2751467 bytes (2.6 MB)
==================================================
downloaded 2.6 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/jj/f_lyv6zd44jfhb75572cw_cc0000gn/T/RtmplzQDYx/downloaded_packages’