Hi, I keep trying to install the package "factoextra." However, every installation package I try it keeps showing as "non zero exit status." I am confused and need help here:
None of these work. The return message I receive is:
ERROR: dependency ‘car’ is not available for package ‘rstatix’
removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rstatix’
Warning in install.packages :
installation of package ‘rstatix’ had non-zero exit status
ERROR: dependencies ‘cowplot’, ‘rstatix’ are not available for package ‘ggpubr’
removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ggpubr’
Warning in install.packages :
installation of package ‘ggpubr’ had non-zero exit status
ERROR: dependencies ‘FactoMineR’, ‘ggpubr’ are not available for package ‘factoextra’
removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/factoextra’
Warning in install.packages :
installation of package ‘factoextra’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/lv/8251w4fx1q19yz0tm2b_fgg00000gn/T/Rtmp2jqIuC/downloaded_packages’
install.packages("car")
Warning in install.packages :
dependency ‘pbkrtest’ is not available
also installing the dependencies ‘Rcpp’, ‘quantreg’, ‘lme4’
There are binary versions available but the source versions are later:
binary source needs_compilation
Rcpp 1.0.4 1.0.4.6 TRUE
quantreg 5.54 5.55 TRUE
lme4 1.1-21 1.1-23 TRUE
Do you want to install from sources the packages which need compilation? (Yes/no/cancel) yes
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/car_3.0-7.tgz'
Content type 'application/x-gzip' length 1544821 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
The downloaded binary packages are in
/var/folders/lv/8251w4fx1q19yz0tm2b_fgg00000gn/T//Rtmp6YUcmw/downloaded_packages
installing the source packages ‘Rcpp’, ‘quantreg’, ‘lme4’
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
trying URL 'HAD TO REMOVE TO POST**
==================================================
downloaded 972 KB
trying URL *HAD TO REMOVE TO POST**
==================================================
downloaded 3.9 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ 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 ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
* installing *source* package ‘quantreg’ ...
** package ‘quantreg’ 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 ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/quantreg’
Warning in install.packages :
installation of package ‘quantreg’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘lme4’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/lme4’
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/lv/8251w4fx1q19yz0tm2b_fgg00000gn/T/Rtmp6YUcmw/downloaded_packages’
I'm pretty sure this indicates your using a mac, and need to install xcode. Here are step by step instructions
Once you've got xcode, retry updating Rccp, and then factoextra.
Also, note for future, this is a good example of how useful sharing your full error messages can be. The pattern that works best for seeking help online is to offer a minimal reproducible example (reprex) of your error, along with your error messages or logs. That kind of information is often key to resolving these kinds of problems.