This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Nominatim setup cannot find postgis.sql

0

Upon running the command,

./Nominatim-2.1/utils/setup.php --osm-file /postgres/OpenStreetMaps/planetfile/north-america-latest.osm.pbf --all --osm2pgsql-cache 18000

the setup ended quickly with the following output.

Create DB
Setup DB
createlang: language "plpgsql" is already installed in database "nominatim"
WARNING:  => is deprecated as an operator name
DETAIL:  This name may be disallowed altogether in future versions of PostgreSQL.
CREATE EXTENSION
ERROR: unable to find /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
unable to find /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql

I know that postgis is installed on my machine, so finding postgis.sql file yielded the following:

/usr/pgsql-9.1/share/contrib/postgis-2.0/postgis.sql
/usr/pgsql-9.1/share/contrib/postgis-1.5/postgis.sql

How can I let Nominatim know where my postgis.sql is? Thanks

asked 08 Oct '13, 02:01

baekacaek's gravatar image

baekacaek
176121317
accept rate: 0%


One Answer:

2

Add, or create if needed, settings/local.php and add the following lines:

@define('CONST_Postgis_Version', '2.0');
@define('CONST_Path_Postgresql_Contrib', '/usr/pgsql-9.1/share/contrib/postgis-2.0');
@define('CONST_Path_Postgresql_Postgis', '/usr/pgsql-9.1/share/contrib/postgis-2.0');

The second line gives the path to spatial_ref_sys.sql if it isn't in the same folder you may need to alter this.

You will find a number of settings in settings in settings/settings.php that should allow you to customise paths as required.

answered 08 Oct '13, 12:41

twain's gravatar image

twain
2.4k2538
accept rate: 40%

edited 08 Oct '13, 12:44

1

Thanks! It somehow flew over my head that this is included in the Nominatim installation wiki.

(08 Oct '13, 17:49) baekacaek

Source code available on GitHub .