使用 EnterpriseDB 的 GUI 安装程序,我在运行 Mavericks 的 Mac 上安装了 Postgres 9.3.5。我选择了安装空间组件的选项,然后自动安装了 PostGIS 2.1.3。启用 PostGIS 扩展后,我能够按预期执行地理计算。然后我发现了 ST_GeomFromGeoJSON 函数(因为我是菜鸟),尝试使用它,并意识到我需要安装 JSON-C,我也安装了。
PostGIS documentation说“要启用 JSON-C,请运行配置 --with-jsondir=/path/to/json-c。有关详细信息,请参阅第 2.4.1 节,‘配置’。” “配置”部分是关于从头开始安装 PostGIS 的。
那么,两个问题: 1. 我可以在不重建 PostGIS 的情况下为 PostGIS 启用 JSON-C 吗? 2. 如果没有,我如何确保我的新 PostGIS 安装包括第一次自动安装的所有功能?我不知道安装程序在做什么,所以我不知道使用了 12 个“--with”选项中的哪一个(如果有的话)。
我是 Postgres/PostGIS 的新手,也是命令行向导的新手。感谢所有帮助。
最佳答案
Questions:
- Can I enable JSON-C for PostGIS without rebuilding PostGIS?
- If not, how can I ensure my new PostGIS install includes all the features that were installed automatically the first time?
不行,这个需要配置和编译。这听起来像是 EnterpriseDB 应该包含的标准功能,所以如果您想要这种方法,那么按照 Craig 的建议,请求它。
有several options for OSX .自制方法 looks like a good one .
brew install postgis
关于macos - 将 JSON-C 添加到现有的 POSTGIS 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25417574/