0

The Problem:

I've installed Nominatim on CentOS 7, but I'm running into an import error when I try to load the data. Here is the error:

Import
Please download and build osm2pgsql.
If it is already installed, check the path in your local settings  (settings/local.php) file.
ERROR: osm2pgsql not found in '/opt/Nominatim/osm2pgsql/osm2pgsql'
osm2pgsql not found in '/opt/Nominatim/osm2pgsql/osm2pgsql'

Osm2pgsql is already installed and here are the following paths after I run some find commands:

/usr/local/bin/osm2pgsql
/usr/local/share/osm2pgsql

I've tried specifying these paths in the local.php file like this:

@define('CONST_Osm2pgsql', '/usr/local/bin/osm2pgsql');
@define('CONST_Osm2pgsql', '/usr/local/share/osm2pgsql');

Unfortunately, I still get the same problem, so I must not be specifying the paths right. Does anyone know the syntax of local.php? There aren't any guides I could find online beyond basic postgresql and postgis configurations.

1

Use the which command to verify the correct path of the osm2pgsql binary:

which osm2pgsql   

And try to use @define('CONST_Osm2pgsql_Binary', '/usr/local/bin/osm2pgsql'); instead of @define('CONST_Osm2pgsql', '/usr/local/bin/osm2pgsql');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.