在我的旧 MacBook 坏掉后,我正在将我一直在构建的 Django Web 应用程序转移到我的新机器(MacBook Pro M1 2021)上。我目前正在为应用程序重新安装正确的软件包和扩展。
但是,当我这样做时,我目前收到以下错误python3 manage.py runserver:
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library
(tried "gdal", "GDAL", "gdal3.3.0", "gdal3.2.0", "gdal3.1.0",
"gdal3.0.0", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0").
Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
Run Code Online (Sandbox Code Playgroud)
我创建的数据库是通过 Postgres.app 上的服务器创建的,我相信它是与 PostGIS、GDAL 等打包在一起的。
我也跑过pip3 install GDAL并且brew install GDAL
我尝试遵循geoDjango 文档,并在终端中添加了以下内容:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/14/bin
Run Code Online (Sandbox Code Playgroud)
当我运行时which psql它返回:/Applications/Postgres.app/Contents/Versions/14/bin/psql
我想不通。
错误的完整回溯:
Watching for file changes with StatReloader
Exception in …Run Code Online (Sandbox Code Playgroud) 云信息新手。我正在使用 aws cloudformation 脚本生成 PostgreSQL RDS 实例。
有没有办法从 aws cloudFormation 脚本启用 PostGIS(和其他扩展)?
postgresql amazon-rds aws-cloudformation postgis-installation
我已经按照这里的描述安装了 postgres 和 postgis
brew install postgres
brew install postgis
createdb postgis_test
psql postgis_test
psql (9.6.2)
Type "help" for help.
postgis_test=# CREATE EXTENSION postgis;
ERROR: could not open extension control file "/usr/local/share/postgresql/extension/postgis.control": No such file or directory
ERROR: could not stat file "/usr/local/share/postgresql/extension/postgis--2.3.2.sql": No such file or directory
ERROR: could not access file "$libdir/postgis-2.3": No such file or directory
Run Code Online (Sandbox Code Playgroud)
可能是什么错误?以及如何解决?
我尝试在 CentOS 8 上安装最新的 PostGIS 3.0.x,但没有成功。
我认为没有人在 RHEL 8 或 CentOS 8 上运行 PostGIS,我不明白为什么不这样做。貌似无法安装。
我已通过禁用 RHEL AppStream 成功安装了 Postgres 12.0
我在 CentOS 8 上安装 postgres 12 所采取的步骤:
1)
#dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Run Code Online (Sandbox Code Playgroud)
2)
#dnf --disablerepo AppStream install postgresql12
#dnf --disablerepo AppStream install postgresql12-server
Run Code Online (Sandbox Code Playgroud)
我现在正在尝试安装 PostGIS。
#dnf list --available | grep postgis30
Run Code Online (Sandbox Code Playgroud)
我看到 postgis30_96 是最新提供的(如下所列):
postgis30_96.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-client.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-client-debuginfo.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-debuginfo.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-devel.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-docs.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-gui.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-gui-debuginfo.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-utils.x86_64 3.0.0alpha4-6.rhel8 pgdg96 …Run Code Online (Sandbox Code Playgroud) postgresql ×3
postgis ×2
amazon-rds ×1
django ×1
gdal ×1
geodjango ×1
hdf5 ×1
macos ×1
osgeo ×1
xerces-c ×1