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

Nominatim setup file showing errors

1

We are facing problem with the setup.php file. Can any one has any way to overcome this error ?

    /public_html/Nominatim]# ./utils/setup.php --osm-file india-latest.osm.pbf --all [--osm2pgsql-cache 18000] 2>&1 | tee setup.log 
Warning: require_once(DB.php): failed to open stream: No such file or directory in /home/xxxxxxx/public_html/Nominatim/lib/db.php on line 2

Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/Nominatim/lib/db.php on line 2

--

asked 31 Jul '15, 08:06

arj123's gravatar image

arj123
46336
accept rate: 0%


One Answer:

1

It seems like you sure you are calling setup.php wrong.

--osm2pgsql-cache is an optional parameter. Either remove it completely or leave it there but remove the square brackets []. They are not part of the parameter but indicate only that this parameter is optional.

answered 31 Jul '15, 08:12

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 31 Jul '15, 08:13

Thanks @scai, so instead of ./utils/setup.php --osm-file <your data="" file=""> --all [--osm2pgsql-cache 24000] 2>&1 | tee setup.log I have to use ./utils/setup.php --osm-file <your data="" file=""> --all --osm2pgsql-cache 24000 2>&1 | tee setup.log ?

(31 Jul '15, 08:19) arj123

Yes, exactly :) Ideally you should adapt the size of the cache to your environment.

(31 Jul '15, 08:49) scai ♦
1

thank you.

(31 Jul '15, 09:16) arj123

Source code available on GitHub .