Postgresql “错误”;找不到PGXS生成文件";在Debian上安装PostGis时

Postgresql “错误”;找不到PGXS生成文件";在Debian上安装PostGis时,postgresql,gis,postgis,Postgresql,Gis,Postgis,我正在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/p

我正在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
并不意味着也安装了开发包

根据错误消息:

请安装PostgreSQL server开发包并重新运行 配置

你需要:

# apt-get install postgresql-server-dev-9.1
另外请注意,还有一个提供了postgres相关软件包(包括postgis)的最新预编译版本,您可以使用它来代替自编译

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

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

Daniel的答案非常有效,只是需要以下更新:

$ sudo apt-get install postgresql-9.1-postgis-2.1
这些软件包可以在将来某个时候再次更新。因此,建议使用aptitude搜索新软件包并安装适当的软件包:

$ aptitude search postgis

下面是一些有用的说明:现在有一个
postgresql-9.3-postgis-2.1
。我多么希望早点知道回购协议的存在:/