1

I'm trying to install Nominatim 3.4.1 on Ubuntu 20.04 and PostgreSQL 12, so I'm following the official instructions from here, the issue is when I execute make, I have this error:

[ 79%] Built target osm2pgsql_lib
[ 79%] Built target osm2pgsql
[ 79%] Running external makefile /usr/lib/postgresql/12/lib/pgxs/src/makefiles/pgxs.mk
/srv/nominatim/Nominatim-3.4.0/module/Makefile:11: warning: overriding recipe for target 'install'
/usr/lib/postgresql/12/lib/pgxs/src/makefiles/pgxs.mk:241: warning: ignoring old recipe for target 'install'
/srv/nominatim/Nominatim-3.4.0/module/nominatim.c:1:10: fatal error: postgres.h: No such file or directory
    1 | #include "postgres.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [<builtin>: nominatim.o] Error 1
make[2]: *** [module/CMakeFiles/nominatim_lib.dir/build.make:61: /srv/nominatim/Nominatim-3.4.0/module/dummy] Error 2
make[1]: *** [CMakeFiles/Makefile2:1908: module/CMakeFiles/nominatim_lib.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

first lines of nominatim.c file:

#include "postgres.h"
#include "fmgr.h"

I've tried find / -name "postgres.h" and find / -name "fmgr.h" and there is no such files.

I'm almost sure that the problem is that PostgreSQL 12 removed this files, changed the names or something similar, and Nominatim 3.1.4 are not aware of that change. I'd like not to downgrade PostgreSQL to solve this unless that is the only possible solution, also I don't know if a downgrade solve the issue.

Emeeus
  • 5,072
  • 2
  • 25
  • 37

1 Answers1

0

on my case this got solved by reinstalling postgres sudo apt install postgresql-server-dev-12 postgresql-12-postgis-3 \ postgresql-contrib-12 postgresql-12-postgis-3-scripts

user3821178
  • 353
  • 6
  • 15