Can';t安装";汽车“;Mac上的R包 R版本3.6.1 R studio版本1.2.5033 Mac OS Catalina版本10.15.3

Can';t安装";汽车“;Mac上的R包 R版本3.6.1 R studio版本1.2.5033 Mac OS Catalina版本10.15.3,r,install.packages,R,Install.packages,当我试图在Rstudio中安装“car”时 > install.packages("car") Installing package into ‘/Users/wuxiaowen/Library/R/3.6/library’ (as ‘lib’ is unspecified) also installing the dependencies ‘SparseM’, ‘minqa’, ‘RcppEigen’, ‘pbkrtest’, ‘quantreg’, ‘lme4’ Warning in

当我试图在Rstudio中安装“car”时

> install.packages("car")
Installing package into ‘/Users/wuxiaowen/Library/R/3.6/library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘SparseM’, ‘minqa’, ‘RcppEigen’, ‘pbkrtest’, ‘quantreg’, ‘lme4’

Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran:
  ‘SparseM’ ‘minqa’ ‘RcppEigen’ ‘quantreg’ ‘lme4’
Do you want to attempt to install these from sources? (Yes/no/cancel) 
当我选择“是”时,它将下载软件包,然后生成大量代码行。。。最后几行是:

17 warnings generated.
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c init.c -o init.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o RcppEigen.so RcppEigen.o RcppExports.o fastLm.o init.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RcppEigen.so] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/RcppEigen’
Warning in install.packages :
  installation of package ‘RcppEigen’ had non-zero exit status
ERROR: dependency ‘SparseM’ is not available for package ‘quantreg’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/quantreg’
Warning in install.packages :
  installation of package ‘quantreg’ had non-zero exit status
ERROR: dependencies ‘minqa’, ‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/lme4’
Warning in install.packages :
  installation of package ‘lme4’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/pbkrtest’
Warning in install.packages :
  installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependencies ‘pbkrtest’, ‘quantreg’, ‘lme4’ are not available for package ‘car’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/car’
Warning in install.packages :
  installation of package ‘car’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/rd/lm38rxvn2_9c80f7062hk5s80000gn/T/RtmpfzTlj3/downloaded_packages’
如果选择“否”,则显示:

ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/pbkrtest’
Warning in install.packages :
  installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependencies ‘pbkrtest’, ‘quantreg’, ‘lme4’ are not available for package ‘car’
* removing ‘/Users/wuxiaowen/Library/R/3.6/library/car’
Warning in install.packages :
  installation of package ‘car’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/rd/lm38rxvn2_9c80f7062hk5s80000gn/T/RtmpfzTlj3/downloaded_packages’

我通过安装Xcode尝试了我在网上找到的一个建议,但似乎并没有解决问题…请帮助。谢谢

您需要安装一个gcc。。看看这个,我想我用自制软件来安装gcc等等。。您也可以尝试其他选项它起作用了!!!非常感谢你。我不知道gcc做什么,但我在这里下载了安装程序,并能够在R中安装该软件包。谢谢!您需要安装一个gcc。。看看这个,我想我用自制软件来安装gcc等等。。您也可以尝试其他选项它起作用了!!!非常感谢你。我不知道gcc做什么,但我在这里下载了安装程序,并能够在R中安装该软件包。谢谢!