注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

PostgreSQL 中文网

 
 
 

日志

 
 

Postgis 问题一例  

2010-11-19 15:05:57|  分类: PG案例分析 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

--安装环境
    今天准备在postgresql.9.0版本基础上搭建一套postgis数据库环境,以前在(postgresql8.4.4上顺利搭建过.), 在今天的安装
过程中遇到一点小问题,后来还是解决了。
 
--环境信息 
OS :  Red Hat Enterprise 5
Postgresql: 9.0.1
Postgis:    1.5.1
proj:  proj-4.7.0
geos: geos-3.2.2

   proj,geos 的安装已经完成,这里不再记录,下面是安装postgis过程,
--config 通过
./configure --prefix=/usr/local/pg_tool/postgis --with-pgconfig=/opt/pgsql/bin/pg_config --with-projdir=/usr/local/pg_tool/proj  --with-geosconfig=/usr/local/pg_tool/geos/bin/geos-config
PostGIS is now configured for x86_64-unknown-linux-gnu

 -------------- Compiler Info -------------
  C compiler:           gcc -g -O2
  C++ compiler:         g++ -g -O2

 -------------- Dependencies --------------
  GEOS config:          /usr/local/pg_tool/geos/bin/geos-config
  GEOS version:         3.2.2
  PostgreSQL config:    /opt/pgsql/bin/pg_config
  PostgreSQL version:   PostgreSQL 9.0.1
  PROJ4 version:        47
  Libxml2 config:       /usr/bin/xml2-config
  Libxml2 version:      2.6.26
  PostGIS debug level:  0

 -------- Documentation Generation --------
  xsltproc:             /usr/bin/xsltproc
  xsl style sheets:    
  dblatex:             
  convert:             

--make 编译通过
[root@172_16_3_216 postgis-1.5.1]# make
make -C liblwgeom
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/liblwgeom'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/liblwgeom'
make -C postgis
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/postgis'
Makefile.pgxs:17: warning: overriding commands for target `install'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:99: warning: ignoring old commands for target `install'
Makefile.pgxs:63: warning: overriding commands for target `installdirs'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:147: warning: ignoring old commands for target `installdirs'
Makefile.pgxs:82: warning: overriding commands for target `uninstall'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:171: warning: ignoring old commands for target `uninstall'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/postgis'
make -C loader
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/loader'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/loader'
make -C utils
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/utils'
chmod +x postgis_restore.pl create_undef.pl postgis_proc_upgrade.pl profile_intersects.pl test_estimation.pl test_joinestimation.pl
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/utils'
PostGIS was built successfully. Ready to install.


--make check 不成功,报CUnit没安装
[root@172_16_3_216 postgis-1.5.1]# make check
make -C liblwgeom
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/liblwgeom'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/liblwgeom'
make -C postgis
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/postgis'
Makefile.pgxs:17: warning: overriding commands for target `install'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:99: warning: ignoring old commands for target `install'
Makefile.pgxs:63: warning: overriding commands for target `installdirs'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:147: warning: ignoring old commands for target `installdirs'
Makefile.pgxs:82: warning: overriding commands for target `uninstall'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:171: warning: ignoring old commands for target `uninstall'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/postgis'
make -C liblwgeom/cunit check
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/liblwgeom/cunit'

WARNING:

configure was unable to find CUnit which is required for unit testing.
In order to enable unit testing, you must install CUnit and then re-run configure.

make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/liblwgeom/cunit'
make -C regress check
make[1]: Entering directory `/opt/soft_bak/postgis-1.5.1/regress'
make -C ../postgis REGRESS=1 DESTDIR=/opt/soft_bak/postgis-1.5.1/regress/00-regress-install install
make[2]: Entering directory `/opt/soft_bak/postgis-1.5.1/postgis'
Makefile.pgxs:17: warning: overriding commands for target `install'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:99: warning: ignoring old commands for target `install'
Makefile.pgxs:63: warning: overriding commands for target `installdirs'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:147: warning: ignoring old commands for target `installdirs'
Makefile.pgxs:82: warning: overriding commands for target `uninstall'
/opt/pgsql/lib/pgxs/src/makefiles/pgxs.mk:171: warning: ignoring old commands for target `uninstall'
/bin/mkdir -p '/opt/soft_bak/postgis-1.5.1/regress/00-regress-install/lib'
'/opt/soft_bak/postgis-1.5.1/regress/00-regress-install/share/contrib/postgis-1.5'
make[2]: /opt/soft_bak/postgis-1.5.1/regress/00-regress-install/share/contrib/postgis-1.5: Command not found
make[2]: *** [installdirs] Error 127
make[2]: Leaving directory `/opt/soft_bak/postgis-1.5.1/postgis'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/opt/soft_bak/postgis-1.5.1/regress'
make: *** [check] Error 2

    注意红色字体部分,出现一个 WARNING,
WARNING:
configure was unable to find CUnit which is required for unit testing.
In order to enable unit testing, you must install CUnit and then re-run configure.

     从上面信息来看,应该是没装CUnit,后来在网上找到 CUnit 官网,以下是关于CUnit的介绍。
  CUnit is a lightweight system for writing, administering, and running unit tests in C. 
It provides C programmers a basic testing functionality with a flexible variety of user interfaces.
  
    后来猜测postgis可能与新版本的postgresql不兼容,于是到Postgis官网,发现有最新版本,1.5.2,下载最新版本后,
重新编译安装,成功。

  评论这张
 
阅读(26307)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016