postgresql – 安装PostGIS的问题

我正在按照以下说明安装PostGIS:
wget http://postgis.refractions.net/download/postgis-1.5.2.tar.gz
tar zxvf postgis-1.5.2.tar.gz && cd postgis-1.5.2/
sudo ./configure && make && sudo checkinstall --pkgname postgis-1.5.2 --pkgversion 1.5.2-src --default

但是它没有通过“sudo ./configure”命令.最后一句话:

configure: error: Could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter.

所以我在网上看到我发现一个这样的地方说:

–with-pgconfig=FILE Postgresql provides a utility called pg_config to
enable extensions like PostGIS to
locate the Postgresql installation
directory. Use this parameter
(–with-pgconfig=/path/to/pg_config)
to manually specify a particular
Postgresql installation that PostGIS
will build against.

我使用“whereis pg_config搜索pg_config,但是找不到.是指“/etc/postgresql/9.0/main/pg_hba.conf”文件还是文件夹??我错过了什么吗?在这一点上我真的很困惑我猜想比真正的清晰度更好的真正的混乱:).

我使用Postgresql 9 / Ubuntu 10.10.任何帮助将不胜感激.

你需要安装geos.

但最简单的安装方式是从ubuntugis-unstable版本库:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update 
sudo apt-get install postgis

如果要从源代码编译,需要安装:

> postgresql-dev(从包管理器)
> libgeos-dev(从包管理器或http://trac.osgeo.org/geos)
> proj4(从包管理器或http://trac.osgeo.org/proj)
> libxml2

如果从包管理器安装,还要检查dev文件

我可能忘记了一些东西,但编译器会告诉你的.

最后,连接到您的数据库并运行以下sql以在空间上启用它:

CREATE EXTENSION postgis;

HTH

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...