gpt4 book ai didi

postgresql - 在 Debian 上安装 PostGis 时出现错误 "the PGXS Makefile cannot be found"

转载 作者:行者123 更新时间:2023-11-29 11:39:10 25 4
gpt4 key购买 nike

我正在 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 分为几个包,安装了 psql 并不意味着也安装了开发包。

根据报错信息:

Please install the PostgreSQL server development packages and re-run configure

你需要:

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

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

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

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

关于postgresql - 在 Debian 上安装 PostGis 时出现错误 "the PGXS Makefile cannot be found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21146279/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com