ubuntu源码安装postgresql(问题解决)转载
来源:互联网 发布:u盘安装mac系统教程 编辑:程序博客网 时间:2024/06/02 06:29
整个安装过程google无数遍,最后终于搭建完了。
具体步骤,以及遇到error解决方案。
1、wgethttp://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.gzmkdir/usr/local/pgsql
tar -zxvfpostgresql-9.1.4.tar.gz
./configure -prefix=/usr/local/pgsql--without-readline
make
make install
2、mkdir /usr/local/geos
wgethttp://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.loIndexedPointInAreaLocator.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 -cIndexedPointInAreaLocator.cpp -o.libs/IndexedPointInAreaLocator.o
../../../libtool: line 990: g++: command notfound
make[4]: *** [IndexedPointInAreaLocator.lo] Error1
make[4]: Leaving directory`/root/software/geos-3.3.5/src/algorithm/locate'
make[3]: *** [all-recursive] Error1
make[3]: Leaving directory`/root/software/geos-3.3.5/src/algorithm/locate'
make[2]: *** [all-recursive] Error1
make[2]: Leaving directory`/root/software/geos-3.3.5/src/algorithm'
make[1]: *** [all-recursive] Error1
make[1]: Leaving directory`/root/software/geos-3.3.5/src'
make: *** [all-recursive] Error1
解决:
apt-get install g++
重新configure
make
make install
3、mkdir /usr/local/proj4
wgethttp://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
wgethttp://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-pgconfigparameter.
解决:
./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 withinthe 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 currentpath. 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 tospecify 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 ortry --with-gdalconfig=
解决:
apt-cache search GDAL
apt-get install libgdal1-dev
configure: WARNING: unrecognized options: --with-pgsql,--with-proj, --with-geos
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
------------------------------------------------------------------------
具体步骤,以及遇到error解决方案。
1、wgethttp://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.gzmkdir/usr/local/pgsql
tar -zxvfpostgresql-9.1.4.tar.gz
./configure -prefix=/usr/local/pgsql--without-readline
make
make install
2、mkdir /usr/local/geos
wgethttp://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='IndexedPointInAreaLocato
libtool: compile:
../../../libtool: line 990: g++: command notfound
make[4]: *** [IndexedPointInAreaLocato
make[4]: Leaving directory`/root/software/geos-3.3.5/src/algorithm/locate'
make[3]: *** [all-recursive] Error1
make[3]: Leaving directory`/root/software/geos-3.3.5/src/algorithm/locate'
make[2]: *** [all-recursive] Error1
make[2]: Leaving directory`/root/software/geos-3.3.5/src/algorithm'
make[1]: *** [all-recursive] Error1
make[1]: Leaving directory`/root/software/geos-3.3.5/src'
make: *** [all-recursive] Error1
解决:
apt-get install g++
重新configure
make
make install
3、mkdir /usr/local/proj4
wgethttp://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
wgethttp://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-pgconfigparameter.
解决:
./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 withinthe 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 currentpath. 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 tospecify 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 ortry --with-gdalconfig=
解决:
apt-cache search GDAL
apt-get install libgdal1-dev
configure: WARNING: unrecognized options: --with-pgsql,--with-proj, --with-geos
Java代码
- 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
make
make install
------------------------------------------------------------------------
Java代码
- 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
0 0
- ubuntu源码安装postgresql(问题解决)转载
- PostgresQL在Ubuntu下源码安装 遇到的问题
- postgresql源码安装
- 源码安装postgresql
- 源码安装postgresql
- 源码安装postgresql
- 源码安装postgresql
- postgresql学习---源码安装
- postgresql源码包安装
- Postgresql源码安装
- 源码方式安装postgresql
- centos7源码安装postgresql
- 在Ubuntu上源码安装MySQL+安装问题解决+安全优化
- 在Ubuntu上源码安装MySQL+安装问题解决+安全优化
- ubuntu下安装postgresql
- 在ubuntu安装PostgreSQL
- ubuntu 安装Postgresql/Pgadmin3
- ubuntu安装PostgreSQL
- python的排序函数sort,sorted
- 如何重置postgresql用户密码
- runtime OC类执行顺序
- java IO 详解
- redis简介
- ubuntu源码安装postgresql(问题解决)转载
- JAVA基础(26) java.util.Queue的简单用法
- 2016Android某公司面试题
- java.lang.IllegalStateException问题的发现与解决
- Linux怎么添加用户成为sudoers
- append(function(index, html)),clone(true)和clone()的区别
- 搜索1001
- PHP正则表达式及实例
- Docker run执行流详解(以volume,network和libcontainer为线索)