postgresql - ubuntu 上的 Postgis 安装

标签 postgresql ubuntu postgis

我正在尝试在 ubuntu Ubuntu 12.04.4 LTS 上安装 postgis。

我搜索存储库并找到一个名为 postgresql-9.1-postgis 的包。然后我安装了它:

sudo apt-get install postgresql-9.1-postgis

它还安装了以下依赖项:

libgeos-3.2.2 libgeos-c1 libproj0 postgis proj-data

然后我认为我可以轻松做到(在我的架构内):

CREATE EXTENSION postgis;

但我却得到了下面详细说明的精彩错误:

ERROR:  could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory


********** Error **********

ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory
SQL state: 58P01

知道如何完成安装以便我可以使用该死的扩展吗?

最佳答案

假设您安装了 postgis 版本 1.5.x。你必须安装postgis 2.0。在安装之前添加正确的存储库。 This链接将帮助您添加正确的存储库。

关于postgresql - ubuntu 上的 Postgis 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21756205/

相关文章:

sql - 多个相似表的规范化

postgresql - 如何修复 postgres 安装 ubuntu 时的错误

linux - 针对正在运行的内核构建外部模块

python - libpython2.7.a 缺少许多引用

python - 在 unix 上为 python 3.5 安装 psycopg2 包

postgresql - PostgreSQL 中的键值对

docker - 在 Windows 10 上的 Ubuntu 中安装 Docker : Failed to Setup IP tables: Unable to enable NAT rule

django - 如何从 Django 连接到多个 PostgreSQL 模式?

sql - 在同一张表上使用 postgis 几何编写 SQL 查询

postgresql - 如何从 postgis 获取城市的区域管理(提名导入)?