【问题标题】:How to install postgis 1.5 in ubuntu 14.04?如何在 ubuntu 14.04 中安装 postgis 1.5?
【发布时间】:2014-09-21 11:38:40
【问题描述】:

问题是我的项目使用旧的 postgres 和 postgis 版本。在 13.04 中,我刚刚下载了 deb 数据包并安装了它,但它看起来在 14.04 中发生了一些变化,并且数据包似乎没有解决它的任何依赖关系。

你有什么想法可以解决吗?

【问题讨论】:

标签: postgresql dependencies postgis ubuntu-14.04 apt


【解决方案1】:

请记住 PostGIS 1.5 is supported for PostgreSQL versions 8.3 to 9.2,但 Ubuntu 14.04 的标准安装是 PostgreSQL 9.3,因此您需要安装旧版本。

我建议从PGDG APT repo 安装 PostgreSQL 9.2,它是经过精心维护的。

安装旧版本的 PostgreSQL 后,您可能需要从源代码构建 PostGIS 1.5。福利如下:

sudo apt-get install build-essential libgeos-c1 libproj-dev libjson-c-dev libxml2-dev libxml2-utils xsltproc docbook-xsl docbook-mathml

以及下载、配置、构建和安装:

wget http://download.osgeo.org/postgis/source/postgis-1.5.8.tar.gz
tar xfvz postgis-1.5.8.tar.gz
cd postgis-1.5.8
./configure
make
sudo make install
sudo ldconfig

另见these build instructions for an older version of Ubuntu。

【讨论】:

  • 成功了。我不太喜欢从源代码安装软件包,非常感谢!附言另外,我必须安装 libgeos-dev 和 postgresql-server-dev-8.4
  • 在带有 PostgreSQL 9.1 的 Ubuntu 15 上运行良好。
  • 应该安装在哪里?一旦安装完成,我该如何“创建扩展 postgis”?
  • create extension postgis 是为 PostGIS 2.0 引入的,因此对于 1.5,您需要创建模板或使用启用脚本。
猜你喜欢
  • 1970-01-01
  • 2017-09-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-01-19
  • 2016-02-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多