【问题标题】:Error "the PGXS Makefile cannot be found" when installing PostGis on Debian在 Debian 上安装 PostGis 时出现“找不到 PGXS Makefile”错误
【发布时间】:2014-01-15 19:17:48
【问题描述】:

我正在 Debian 机器上通过 psql 安装 PostGis(实际上是 crunchbang)。

我已完成以下步骤:

$ wget http://download.osgeo.org/postgis/source/postgis-2.0.3.tar.gz
$ tar xzf postgis-2.0.3.tar.gz
$ cd postgis-2.0.3
$ ./configure

在最后一步我收到以下错误:

configure: error: the PGXS Makefile /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk cannot be found. Please install the PostgreSQL server development packages and re-run configure.

问题是我已经安装了 Postgres:

$ psql --version
psql (9.1.9)

我已经在两台具有相同配置的机器上进行了检查,并得到相同的错误。我在这里错过了什么?

【问题讨论】:

标签: postgresql gis postgis


【解决方案1】:

PostgreSQL 分为几个包,安装了psql 并不意味着也安装了开发包。

根据报错信息:

请安装 PostgreSQL 服务器开发包并重新运行 配置

你需要:

# apt-get install postgresql-server-dev-9.1

另请注意,APT pgdg repository 提供最新的 postgres 相关包(包括 postgis)的预编译版本,您可以使用它们来代替自编译。

如果您的系统设置为使用此存储库,请执行以下操作:

# apt-get install postgresql-9.1-postgis-2.0

【讨论】:

  • 现在有一个postgresql-9.3-postgis-2.1。我多么希望我早点知道这个 repo 的存在:/
【解决方案2】:

Daniel 的回答效果很好,只是它需要以下更新:

$ sudo apt-get install postgresql-9.1-postgis-2.1

这些软件包可以在将来的某个时间再次更新。因此,建议使用 aptitude 搜索新的包并安装相应的包:

$ aptitude search postgis

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-11-07
    • 1970-01-01
    • 2020-03-27
    • 2012-11-11
    • 2019-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多