安装 Nominatim 时,osm 数据导入出错

安装 Nominatim 时,osm 数据导入出错

我正在服务器上进行 nominatim 安装。我运行以下命令

./utils/setup.php --osm-file /usr/share/osm2pgsql/planetfile/planet-latest.osm.pbf --all

导入 pbf 文件,并成功导入一些表,最后在脚本结束时我收到以下错误:

/usr/share/osm2pgsql/osm2pgsql -lSc -O gazetteer --hstore -C 24591 -d nominatim /usr/share/osm2pgsql/planetfile/planet-latest.osm.pbfUsing projection SRS 4326 (Latlong)
NOTICE:  table "place" does not exist, skipping
NOTICE:  type "keyvalue" does not exist, skipping
NOTICE:  type "wordscore" does not exist, skipping
NOTICE:  type "stringlanguagetype" does not exist, skipping
NOTICE:  type "keyvaluetype" does not exist, skipping
NOTICE:  function get_connected_ways(pg_catalog.int4[]) does not exist, skipping
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=24591MB, maxblocks=3147649*8192, allocation method=3
Mid: Ram, scale=10000000

Reading in file: /usr/share/osm2pgsql/planetfile/planet-latest.osm.pbf
Entity: line 1: parser error : Document is empty

^
/usr/share/osm2pgsql/planetfile/planet-latest.osm.pbf : failed to parse
Error occurred, cleaning up
osm2pgsql SVN version 0.80.0 (32bit id space)

DB Error: no such table

请建议我该怎么做才能解决这个问题。给我任何解决方案。提前谢谢。

答案1

你可以尝试

apt-get isntall libprotobuf-c0-dev libprotobuf-dev protobuf-c-compiler protobuf-compiler

相关内容