【发布时间】:2021-12-14 21:43:54
【问题描述】:
我们收到“django.core.exceptions.ImproperlyConfigured: 找不到 GDAL 库”,GeoDjango's common installation issue。
开发环境是 Win10,GDAL 库被解析为following this answer on the same question for windows,它直接提供文件路径。我现在无法部署,因为 prod 是 Ubuntu 20.04,并且该答案没有解决如何在 Ubuntu 上解决。
我是 Ubuntu / Linux 的新手,我想我已经用 sudo apt install libpq-dev gdal-bin libgdal-devfollowing these instructions 安装了 GDAL,但 Django 不知道如何找到库,我也不知道。This question 提到“GDAL_LIBRARY_PATH = ' /usr/local/lib/libgdal.so.1.15.1'”,但我的“/usr/local/lib/”只包含python3.8和3.9的目录。
另外,不确定是否相关,但我正在 Dokku 上进行部署,并且不确定容器化是否会阻止 Django 在我不太了解的 Dokku 奇特的生态系统之外找到库。 This post is the only other post mentioning both Dokku and GDAL,尽管它询问了一些无关的东西,但它的 requirements.txt 包括“GDAL==2.4.1”。我们可以通过类似的方式提供它来解决这个问题吗?
我错过了什么简单的事情或做错了什么?
【问题讨论】:
标签: django ubuntu gdal geodjango dokku