【问题标题】:Tilemill error Could not create datasource for type: 'postgis' (searched for datasource plugins in '/usr/lib/mapnik/input')Tilemill 错误无法为类型创建数据源:“postgis”(在“/usr/lib/mapnik/input”中搜索数据源插件)
【发布时间】:2014-09-09 11:14:29
【问题描述】:

已关注链接OSM Quick start

有点问题,但我设法执行了所有步骤。但是当我在 tilemill 打开我新创建的项目时,我们很生气,它显示错误

在第 197 行解析层中的“landuse_gen0”层时遇到类型:“postgis”(在“/usr/lib/mapnik/input”中搜索数据源插件)无法创建数据源

谁能告诉我这个错误是什么以及如何解决它。我已按照上面的所有步骤提供链接?

【问题讨论】:

标签: openstreetmap tilemill mapnik


【解决方案1】:

您应该检查目录/usr/local/lib/mapnik/input,您会发现文件postgis.input 丢失了。

原因是当你编译mapnik时,插件'postgis'的依赖不能满足。你可以在 shell 中运行python scons/scons.py INPUT_PLUGINS='postgis',你会被提醒一些依赖问题。所以你应该在make mapnik之前将postgresql和postgis添加到系统环境中。

确保postgresql94-devel已经安装或者你可以运行sudo yum install postgresql94-devel。然后,你可以这样做

export PATH=$PATH:/usr/pgsql-9.4/bin:/usr/pgsql-9.4/lib:/usr/local/lib

然后对 mapnik 使用 ./configuremakemake install 命令。重新安装mapnik后,应该在/usr/local/lib/mapnik/input目录下找到postgis.input,然后重试。

【讨论】:

    【解决方案2】:

    OSM Bright Quick Start”页面有点过时了。为 Linux Mint 17.1/Ubuntu 14.04 安装 postgres/postgis 以在步骤 0 + 1 中处理的一些差异:

    sudo apt-get install postgresql-9.3-postgis-2.1
    sudo apt-get install mapnik-input-plugin-postgis
    # Set every method to "trust"
    sudo vim /etc/postgresql/9.3/main/pg_hba.conf
    sudo /etc/init.d/postgresql restart
    psql -U postgres -c "create database osm;"
    psql -U postgres -d osm -f /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis.sql
    psql -U postgres -d osm -f /usr/share/postgresql/9.3/contrib/postgis-2.1/spatial_ref_sys.sql
    

    这对我有用。然后按照步骤 2...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 2018-10-02
      • 1970-01-01
      • 2019-06-12
      相关资源
      最近更新 更多