整个安装过程google无数遍,最后终于搭建完了。
具体步骤,以及遇到error解决方案。
1、wget http://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.gzmkdir /usr/local/pgsql
tar -zxvf postgresql-9.1.4.tar.gz
./configure -prefix=/usr/local/pgsql --without-readline
make
make install
2、mkdir /usr/local/geos
wget http://download.osgeo.org/geos/geos-3.3.5.tar.bz2
tar jxf geos-3.3.5.tar.bz2
cd geos-3.3.5
./configure -prefix=/usr/local/geos
make
make install
error:
source='IndexedPointInAreaLocator.cpp' object='IndexedPointInAreaLocator.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../../../depcomp \
/bin/bash ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/geos -I../../../include -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -c -o IndexedPointInAreaLocator.lo IndexedPointInAreaLocator.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/geos -I../../../include -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -c IndexedPointInAreaLocator.cpp -o .libs/IndexedPointInAreaLocator.o
../../../libtool: line 990: g++: command not found
make[4]: *** [IndexedPointInAreaLocator.lo] Error 1
make[4]: Leaving directory `/root/software/geos-3.3.5/src/algorithm/locate'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/software/geos-3.3.5/src/algorithm/locate'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/software/geos-3.3.5/src/algorithm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/software/geos-3.3.5/src'
make: *** [all-recursive] Error 1
解决:
apt-get install g++
重新configure
make
make install
3、mkdir /usr/local/proj4
wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
tar zxf proj-4.8.0.tar.gz
cd proj-4.8.0
./configure –prefix=/usr/local/proj4
make
make install
4、mkdir /usr/local/postgis
wget http://postgis.refractions.net/download/postgis-2.0.1.tar.gz
tar zxf postgis-2.0.1.tar.gz
cd postgis-2.0.1
./configure -prefix=/usr/local/postgis --with-pgsql=/usr/local/pgsql/bin/pg_config --with-proj=/usr/local/proj4 --with-geos=/usr/local/geos/bin/geos-config
error:
configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter.
解决:
./configure -prefix=/usr/local/postgis --with-pgsql=/usr/local/pgsql/bin/pg_config --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-proj=/usr/local/proj4 --with-geos=/usr/local/geos/bin/geos-config
configure: error: could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.
解决:
apt-get install libxml2
apt-get install libxml2-dev
./configure -prefix=/usr/local/postgis --with-pgsql=/usr/local/pgsql/bin/pg_config --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-proj=/usr/local/proj4 --with-geos=/usr/local/geos/bin/geos-config
error:
configure: error: could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.
解决:
./configure -prefix=/usr/local/postgis --with-pgsql=/usr/local/pgsql/bin/pg_config --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-proj=/usr/local/proj4 --with-geos=/usr/local/geos/bin/geos-config --with-geosconfig=/usr/local/geos/bin/geos-config
error:
configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
解决 :
./configure -prefix=/usr/local/postgis --with-pgsql=/usr/local/pgsql/bin/pg_config --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-proj=/usr/local/proj4 --with-geos=/usr/local/geos/bin/geos-config --with-geosconfig=/usr/local/geos/bin/geos-config --with-projdir=/usr/local/proj4
error:
configure: error: gdal-config not found. Use --without-raster or try --with-gdalconfig=<path to gdal-config>
解决:
apt-cache search GDAL
apt-get install libgdal1-dev
configure: WARNING: unrecognized options: --with-pgsql, --with-proj, --with-geos
PostGIS is now configured for x86_64-unknown-linux-gnu
-------------- Compiler Info -------------
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
SQL preprocessor: /usr/bin/cpp -traditional-cpp -P
-------------- Dependencies --------------
GEOS config: /usr/local/geos/bin/geos-config
GEOS version: 3.3.5
GDAL config: /usr/bin/gdal-config
GDAL version: 1.6.3
PostgreSQL config: /usr/local/pgsql/bin/pg_config
PostgreSQL version: PostgreSQL 9.1.4
PROJ4 version: 48
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.7.6
JSON-C support: yes
PostGIS debug level: 0
Perl: /usr/bin/perl
--------------- Extensions ---------------
PostGIS Raster: enabled
PostGIS Topology: enabled
-------- Documentation Generation --------
xsltproc:
xsl style sheets:
dblatex:
convert:
mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
final config:
./configure -prefix=/usr/local/postgis --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/geos/bin/geos-config --with-projdir=/usr/local/proj4
make
make install
------------------------------------------------------------------------
WARNING: You have set the --prefix to '/usr/local/postgis'. But we mostly
ignore the --prefix. For your info, using the values determined from
/usr/local/pgsql/bin/pg_config we will be installing:
* postgis shared library in /usr/local/pgsql/lib
* postgis SQL files in /usr/local/pgsql/share/contrib/postgis-2.0
* postgis executables in /usr/local/pgsql/bin
分享到:
相关推荐
Ubuntu下源码安装Postgresql,包括编译和安装的详细过程,实践可行
postgresql-11 Ubuntu22.04离线安装包,deb格式。 执行压缩包内 install.sh 可一键安装。 适用于无互联网环境。
postgresql-10.6-ubuntu:在Ubuntu上构建Postgres 10.6的源代码
由于我们没有什么特殊需求所在在此选择较为简单的方式——二进制安装包安装,二进制包安装的方法一般都是通过不同发行版本的Linux下的包管理器进行的,例如Debian和Ubuntu下是使用apt-get命令或aptitude命令来安装,...
vs2017调试linux程序 ubutu 16.4 postgresql gdal 附源码,此路有点坎坷。附代码。希望对路人有所帮助。
PostgreSQL的安装方法比较灵活,可以用源码包安装,也可以用您使用的发行版所带的软件包来安装,还可以采用在线安装…… 1.1 系统环境:Ubuntu Linux 7.04 ;Fedora;Slackware; 1.2 安装; Ubuntu下安装 软件其实...
linux安装 GDAL3.0.4+Postgresql 12.2+Postgis-3.0.1 安装软件及依赖全套,共计17个
ansible-ycsb Ansible-ycsb是为创建的一个简单工具,它使用我的在AWS EC2上针对PostgreSQL... postgresql_from_source-直接从源代码安装PostgreSQL(master分支) 日志-将MongoDB的写关注级别设置为journaled js
本系列背景介绍 Odoo 是一个基于Python语言构建的...Odoo14的安装和历史版本差不多,同样也包括安装文件,源码,Docker等多种形式,本文则通过源码方式在Ubuntu 18.04上安装Odoo 14. Postgresql数据库准备 在Postgre
这个版本是ubuntu14.04 lts源中的postgre对应的源码
此存储库包含用于提取以下论文中使用的对话框的源代码: Ubuntu 对话语料库:用于研究非结构化多轮对话系统的大型数据集 。 依赖关系 PostgreSQL 附魔 PyPy(pyenchant,psycopg2) NodeJS(蓝鸟、knex、mkdirp)...
PostgreSQLSQLite外部数据包装器 ...如果要在PostgreSQL源代码树中构建sqlite_fdw,请使用 make make install 用法 负载扩展 CREATE EXTENSION sqlite_fdw; 创建服务器 请使用database选项指定SQLite数据库路径: CREA
源码编译安装,最稳定的源码是最新版本,官网下载 一些安全优化 提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-5.5、Percona-8.0、Percona-...
源码编译安装,最稳定的源码是最新版本,官网下载 一些安全优化 提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-5.5、Percona-8.0、Percona-...
要从源代码编译和安装,请运行: make && make install 。 此扩展名将由Promscale连接器通过CREATE EXTENSION自动创建,而不应手动创建。 常见编译问题 cargo: No such file or directory意味着未安装 没有找到...
sudo apt-get install git sendmail postgresql python postgresql-plpython-9.1 python-pip libpq-dev python-dev libxml2-dev libxslt1-dev libgeos-c1 mercurial meld Python依赖关系 sudo pip install ...
这是该服务的源代码,被称为“最终”。 这个程序提供灵活有效的事件管理。 “最终”有助于管理事件,将人员归为团队,分担责任并提醒未来发生的事件。 技术领域 Python(3.6.3) PostgreSQL(9.5.9) Django...
集成零售管理, 电子商务, 供应链管理, 财务管理, 车队管理, 仓库...操作系统环境:CentOS 6+/Ubuntu 16.04+ 数据库:MySQL 5.7+, GBase 8s,Informix 11, PostgreSQL 9.3+ 缓存系统: Redis 3.2+ 事件流系统: Kafka
DuckDuckGo-社区平台这是DuckDuckGo社区平台的源代码。要求/安装DuckDuckGo社区平台基于 , , , 和。 需要perl 5.16.3(或更高版本),并且: cpanm(和/或推荐) gcc工具链(gcc,make,lib标头) 吉特libcurl ...
看不到源码如何构建和运行 WorldMap 按照这些说明在 Ubuntu 16.04 LTS 中构建和运行 WorldMap。 安装 Ubuntu 依赖项 $ sudo apt-get update $ sudo apt-get install python-virtualenv python-dev libxml2 libxml2-...