When using osm2pgsql
to import massachusetts-latest.osm.bz2
into PostGIS 2.0.1 database osm
(running on PostgreSQL 9.1 on an Ubuntu 12.04), I get the error failed: ERROR: operator class "gist_geometry_ops" does not exist for access method "gist"
.
I have ran the enabler .sql
scripts including legacy.sql
. Truncating the tables and reimporting does not help. Any idea what is causing this error?
Command
osm2pgsql massachusetts-latest.osm.osm.bz2 -d osm -U postgres -P 5432 --hstore -W
Output:
Reading in file: massachusetts-latest.osm.bz2
Processing: Node(23054k) Way(2370k) Relation(5058) parse time: 300s
Node stats: total(23054254), max(2147478725)
Way stats: total(2370244), max(215072011)
Relation stats: total(5058), max(2855687)
Writing way (2370k)
Writing relation (5058)
Committing transaction for planet_osm_point
Sorting data and creating indexes for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_roads
Sorting data and creating indexes for planet_osm_line
Committing transaction for planet_osm_polygon
Sorting data and creating indexes for planet_osm_roads
Sorting data and creating indexes for planet_osm_polygon
CREATE INDEX planet_osm_roads_index ON planet_osm_roads USING GIST (way GIST_GEOMETRY_OPS) TABLESPACE pg_default;
failed: ERROR: operator class "gist_geometry_ops" does not exist for access method "gist"
Error occurred, cleaning up