Closed ptrhck closed 5 years ago
Hi @ptrhck, if you are using the Docker image the library is located at /usr/local/lib
If you are talking about the Lambda function, the Lambda layer gets mounted at /opt, so /opt/lib
is where libgdal is located. In most cases however the system should already know to look there for libraries. Give that a try and let us know how it works, thanks.
The following seems to work in the django settings.py:
if "LAMBDA_TASK_ROOT" in os.environ:
GDAL_LIBRARY_PATH = '/opt/lib/libgdal.so'
Great, thanks for following up!
Hi,
am I right that simply adding your public layer to my lambda function makes GDAL available to my lambda function?
I get the following error invoking the function:
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", "gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
Is that some non-standard location for gdal? As far as I can see here, I might need to adjust the path. But, where to?