postgis-2.0.so : undefined symbol: GETSTRUCT

标签 postgis

当我使用 pg_upgrade 检查将 postgresql 9.0 beta2 升级到 postgresql 9.3 beta1 时。
下面发生错误:

uptest@db-172-16-3-33-> cat loadable_libraries.txt 
Could not load library "$libdir/postgis-2.0"
ERROR:  could not load library "/opt/pgsql9.3beta1/lib/postgis-2.0.so": /opt/pgsql9.3beta1/lib/postgis-2.0.so: undefined symbol: GETSTRUCT

详细程序:
  • 安装 9.3
  • initdb 9.3
  • 安装(pgfincore,pg_stat_statements,postgis,不要安装模式sql)
  • 检查

  • 我的 LD_LIBRARY_PATH是:
    LD_LIBRARY_PATH=/opt/pgsql9.3beta1/lib:/opt/postgis-2.0.3-for9.3/lib:/opt/gdal-1.10.0/lib:/opt/geos-3.3.8/lib:/opt/json-c-git20130520/lib:/opt/proj-4.8.0/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib /opt/pgsql9.3beta1/bin/pg_upgrade -c -b /opt/pgsql9.0beta2/bin -B /opt/pgsql9.3beta1/bin -d /pgdata1099 -D /pgdata2099 -p 1099 -P 2099 -u postgres -v
    

    然后是错误:
    Checking for presence of required libraries                 fatal
    
    Your installation references loadable libraries that are missing from the
    new installation.  You can add these libraries to the new installation,
    or remove the functions using them from the old installation.  A list of
    problem libraries is in the file:
        loadable_libraries.txt
    
    Failure, exiting
    

    解决:

    这是 postgresql 9.3 的 postgis 错误。
    并解决了它。

    谢谢。

    http://trac.osgeo.org/postgis/changeset/10321

    vi/opt/soft_bak/postgis-2.0.3/postgis/geometry_estimate.c
    //add
    #if POSTGIS_PGSQL_VERSION >= 93
      #include "access/htup_details.h"
    #endif
    

    然后 gmake , gmake install
    do pg_upgrade 现在通过了。

    最佳答案

    这是从问题中引用的。 (OP已编辑问题)

    引用:

    这是 postgresql 9.3 的 postgis 错误。并解决了它。

    谢谢。

    http://trac.osgeo.org/postgis/changeset/10321

    vi/opt/soft_bak/postgis-2.0.3/postgis/geometry_estimate.c

    //add
    #if POSTGIS_PGSQL_VERSION >= 93
      #include "access/htup_details.h"
    #endif
    

    然后 gmake , gmake install
    do pg_upgrade 现在通过了。

    关于postgis-2.0.so : undefined symbol: GETSTRUCT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16644163/

    相关文章:

    python - 将多边形的 shapefile 转换为 numpy 数组

    postgresql - 在 openlayers 3 中重新投影图层

    php - 将几何线连接在一起的 PostGIS 函数?

    python - 属性错误 : module 'django.db.models' has no attribute 'MultiPolygonField'

    php - 将点插入启用 PostGis 的 Postgres 数据库

    python - 在 Django 中为 ubuntu 11.10 设置 Postgresql 9.1 数据库

    postgresql - ogr2ogr 和 Postgis/PostgreSQL 数据库的编码问题

    postgresql - 使用 activerecord-postgis-adapter 并且点未转换为球形

    database - 从坐标 POSTGIS 创建的线串

    sql - st_intersects 与 st_overlaps