我正在 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服务器开发包并重新运行
配置
你需要:
# apt-get install postgresql-server-dev-9.1
另请注意,有一个APT pgdg 存储库 https://wiki.postgresql.org/wiki/Apt提供 postgres 相关包(包括 postgis)的最新预编译版本,您可以使用它们而不是自编译。
如果您的系统设置为使用此存储库,只需执行以下操作:
# apt-get install postgresql-9.1-postgis-2.0
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)