无法安装SF .9

问题描述

我需要获取sf的0.9版本才能使用星标和mapsapi(星标需要sf =

我当前的科幻小说链接到GEOS 3.7.2,GDAL 2.4.2,PROJ 5.2.0,而我的rgdal版本是1.48

我尝试按照此处的说明进行安装:https://github.com/r-spatial/sf 因为我已经安装了gdal

install.packages("sf",configure.args = "--with-proj-lib=/usr/local/lib/")

但是我得到这个错误

xcrun: error: invalid active developer path (/Library/Developer/CommandLinetools),missing xcrun at: /Library/Developer/CommandLinetools/usr/bin/xcrun
configure: CC: 
configure: CXX:  
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration Failed for package ‘sf’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/sf’
* restoring prevIoUs ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/sf’
Warning in install.packages :
  installation of package ‘sf’ had non-zero exit status

不确定如何解决错误,我是一个新手,所以希望您能获得一些详细的说明!谢谢

sessionInfo()
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8


attached base packages:
[1] stats     graphics  Grdevices utils     datasets  methods   base     

other attached packages:
[1] sf_0.8-1    rgdal_1.4-8 sp_1.4-1   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4         pillar_1.3.1       compiler_3.5.2     class_7.3-14       prettyunits_1.0.2  remotes_2.2.0     
 [7] tools_3.5.2        pkgbuild_1.0.5     tibble_2.1.3       lattice_0.20-38    pkgconfig_2.0.2    rlang_0.4.5       
[13] Matrix_1.2-15      cli_1.1.0          DBI_1.0.0          rstudioapi_0.9.0   curl_3.3           yaml_2.2.0        
[19] xfun_0.4           e1071_1.7-0        dplyr_0.8.5        knitr_1.25         classInt_0.4-2     grid_3.5.2        
[25] tidyselect_0.2.5   glue_1.3.0         data.table_1.12.8  R6_2.3.0           processx_3.4.1     purrr_0.2.5       
[31] callr_3.3.2        magrittr_1.5       units_0.6-2        codetools_0.2-15   ps_1.3.0           assertthat_0.2.0  
[37] KernSmooth_2.23-15 Crayon_1.3.4

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)