I am trying to follow the installation of Nominatim, based on http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Ubuntu.2FDebian. The command

./utils/setup.php —osm-file <pbf-file> —all —osm2pgsql-cache 18000 2>&1 | tee setup.log

returns an error: 'PostgreSQL version is not correct. Expected 9.3 found 9.4'.

How do I get this line to work with version 9.4 instead of 9.3? I checked my version of PostgreSQL and it is 9.4.3. Looking into setup.php, I find the function returning the error

$sVersionString = $oDB->getOne('select version()';
reg_match('#PostgreSQL ([0-9]+){.]([0-9]+)[ˆ0-9]#', $sVersionString, $aMatches);
if (CONST_Postgresql_Version != $aMatches[1].'.'.$aMatches[2])
    echo "ERROR: PostgreSQL version is not correct. Expected ".CONST_Postgresql_Version." found ".$aMatches[1].'.'.$aMatches[2].'\n';

My operating system is Debian Jessie and I am using UbuntuGIS repositories, just in case this has anything todo with the error.


Alright, when installing Nominatim a folder 'settings' is created, holding a PHP file named 'settings.php'. Within this file all sorts of constants are defined - also 'CONST_Postgresql_Version'.

Simply edit this file and change the value from 9.3 to 9.4 will overcome the initial error message.

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.