NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Installed Nominatim and received the following error during import of the pbf:




Projection code failed to initialise

osm2pgsql SVN version 0.80.0 (64bit id space)

ERROR: Error executing external command: /home/user/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 1059 -d nominatim /home/user/osm_data/central-america.osm.pbf

Not sure if this is the issue or not but I am not importing the planet file just two country files.

asked 17 Sep '12, 19:13

mooreja's gravatar image

accept rate: 0%

A g-search for "Projection code failed to initialise" leads to the page, which explains:

On windows make sure that PROJ_LIB environment variable is define to the location of your epsg file (In some case the path is: "C:\ms4w\proj\nad") - else you will get a "Projection code failed to initialise" error."
permanent link

answered 17 Sep '12, 20:16

mmehl's gravatar image

accept rate: 15%

Apologies. This isn't a windows environment. I should have put in the environment.

Ubuntu 12.04 server Postgresql 9.1.4 PostGIS 2.01

I followed the latest Nominatim installlation procedures outlined on

(17 Sep '12, 21:05) mooreja

Is "proj-epsg" installed properly?

From the Installation guide:

There is also a problem with proj-epsg on some platforms, so we manually install it:


rpm -i proj-epsg-4.7.0-1.el6.x86_64.rpm --nodeps

(17 Sep '12, 21:35) mmehl

Does that problem apply to Ubuntu too? That line's in the Fedora section of the wiki page, and on Ubuntu an alternative to an rpm would be needed.

(17 Sep '12, 22:04) SomeoneElse ♦

No, since that portion of the procedure deals with Fedora/CentOS, and the link is fedora specific, it shouldn't be applicable to an Ubuntu implementation.

(18 Sep '12, 00:56) mooreja

Update. The error is being caused by the -l in the osm2pgsql -lsc. I can run the script without the -l but I later get SRID erors which I suspect is being caused by this projection failure.

I have read the osm2pgsql man page and have seen the supported projections but am unsure exactly how the -l checks for the projections.

Does anyone have any knowledge of that?

Thanks in advance.

(18 Sep '12, 17:29) mooreja

Found a discussion about a similar problem at Even though the discussion happened several years ago the information provided to troubleshoot is still relevant.

In doing some of the troubleshooting listed in this discussion I was able to identify and resolve the problem.

Thanks to Jon Burgess for providing the level of detail that he did in that discussion.


permanent link

answered 19 Sep '12, 13:23

mooreja's gravatar image

accept rate: 0%

edited 19 Sep '12, 13:25

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Sep '12, 19:13

question was seen: 7,253 times

last updated: 19 Sep '12, 13:25

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum