rspatial / terra

R package for spatial data handling https://rspatial.github.io/terra/reference/terra-package.html
GNU General Public License v3.0
543 stars 90 forks source link

Can't find gdal-config during installation #1647

Open davidelahoz opened 2 days ago

davidelahoz commented 2 days ago

When trying to install terra on a Rstudio server running on ubuntu server, the following message is shown, impeding this package installation:

* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++17
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/home/operador/R/x86_64-pc-linux-gnu-library/4.3/terra’
Warning in install.packages :
  installation of package ‘terra’ had non-zero exit status

I have GDAL 3.8.4 installed on that server

Does this package require a specific version of GDAL to work?

davidelahoz commented 1 day ago

libgdal-dev was missing. After installing it, spatialEco installation worked fine

Would it be possible to mention that libgdal-dev is missing in that warning?