Heroku gdal-config missing when installing R packages (rgdal,terra)

47 Views Asked by At

I have a python app that executes an R script that requires rgal & terra to work. I first install the heroku-geo-buildpack.git buildpack followed by R and python. However when the init.R script begins to execute I get the error "configure: error: gdal-config not found or not executable."

remote: -----> Building on the Heroku-22 stack
remote: -----> Using buildpacks:
remote:        1. https://github.com/heroku/heroku-geo-buildpack.git
remote:        2. vsv/heroku-buildpack-r
remote:        3. heroku/python
remote: -----> Geo Packages (GDAL/GEOS/PROJ) app detected
remote: -----> Installing GDAL-3.5.0
remote: -----> Installing GEOS-3.10.2
remote: -----> Installing PROJ-8.2.1
remote: -----> R app detected
remote: -----> Installing R
remote:        Version 4.2.1 will be installed on heroku-22 stack.
remote: -----> Downloading buildpack archives from AWS S3
remote:        Downloading https://heroku-buildpack-r.s3.amazonaws.com/latest/heroku-buildpack-r-22-4.2.1-deploy.tar.gz
remote:        Setting up build environment
remote:        Downloading https://heroku-buildpack-r.s3.amazonaws.com/latest/heroku-buildpack-r-22-4.2.1-chroot.tar.gz
remote: -----> Configuring build environment...
remote: -----> Executing init.R file
.
.
.
remote:        configure: error: gdal-config not found or not executable.
remote:        ERROR: configuration failed for package ‘terra’

Does anyone know how to either find where gdal is being installed so I could possibly set an environment variable for it so R can find it? I don't think I can containerise my app with something like this method as it's a python app. Thanks

0

There are 0 best solutions below