Помощь в установке пакета 'rgdal' на Mac - PullRequest
1 голос
/ 08 апреля 2020

Как установить пакет "rgdal" на MacOS Catalina?

Выполнен следующий код:

 install.packages('rgdal', type = "source", configure.args=c(
  '--with-gdal-config=/Library/Frameworks/GDAL.framework/Programs/gdal-config',
  '--with-proj-include=/Library/Frameworks/PROJ.framework/Headers',
  '--with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib'))

Получите следующее сообщение об ошибке :

trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.4-8.tar.gz'
    Content type 'application/x-gzip' length 1698902 bytes (1.6 MB)
    ==================================================
    downloaded 1.6 MB
    * installing *source* package ‘rgdal’ ...
    ** package ‘rgdal’ successfully unpacked and MD5 sums checked
    configure: R_HOME: /Library/Frameworks/R.framework/Resources
    xcrun: error: invalid active developer path /Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    configure: C++11 support not available
    configure: rgdal: 1.4-7
    checking for /usr/bin/svnversion... yes
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    configure: svn revision: 845
    configure: gdal-config set to /Library/Frameworks/GDAL.framework/Programs/gdal-config
    checking gdal-config exists... no
    configure: error: gdal-config not found - configure argument error.
    ERROR: configuration failed for package ‘rgdal’
    * removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rgdal’
    Warning in install.packages :
      installation of package ‘rgdal’ had non-zero exit status

    The downloaded source packages are in
        ‘/private/var/folders/vz/0nmhj0qj27s_y3zjxjx6w3g40000gn/T/RtmpW2iTzA/downloaded_packages’

1 Ответ

0 голосов
/ 08 апреля 2020

Вы пытались загрузить пакет без дополнительных аргументов?

install.packages('rgdal')

У меня не было проблем с этим пакетом в ОС Catalina.

...