Using GDAL with App Platform

I am trying to deploy a django app to app platform, a process I have done a bunch of times. My workflow follows this tutorial:

I push new updates to my github repository and then the app builds and deploys

This new app requires GDAL be installed on the runtime system, however I am unclear on how I can get this set up on the environment.

Currently my build fails and ChatGPT tells me that the error is:

This error suggests that the system is unable to locate the libgdal shared library required by Django’s GeoDjango module, which is used for geographic and spatial functionality. This library is a dependency for the django.contrib.gis module, which is causing the error in your case.

The issue could be related to missing or misconfigured dependencies or a problem with the environment setup.

Any suggestions would be appreciated.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 9, 2023

Hi there,

Indeed, it sounds like that the GDAL package is not available by default on the DigitalOcean App Platform.

However, in order to install custom dependencies, you would need to use a Dockerfile rather than the native buildpacks.

You can follow the steps on how to do that here:

That way you will have full control over what packages get installed during the build process.

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel