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

OSM2PGSQL unable to read .pbf files

0

Hi,

I have installed osm2pgsql with all required dependencies (according to https://wiki.openstreetmap.org/wiki/Osm2pgsql), but when reading a .pbf file, I'm getting this message:

ERROR: PBF support has not been compiled into this version of osm2pgsql, please either compile it with pbf support or use one of the other input formats

My version of osm2pgsql is 0.85.0, so I think it's supposed to read .pbf. Is there anything I can do about it?

EDIT: OK, already solved - I've made some reinstalls, I've also tried some older versions, so I don't know what exactly caused this issue, but now everything, works fine.

asked 04 Feb '14, 10:10

Speeder1612's gravatar image

Speeder1612
16222
accept rate: 0%

edited 04 Feb '14, 11:41

Hi can you tell me where did you get the older version of osm2pgsql? My osm2pgsql is 0.87.0 and it doesn't work either. Thank you!

(08 Dec '14, 01:06) studiousdavid

One Answer:

2

Have you read the part of the instructions where it says:

If you want PBF read support, you will also need libprotobuf-c0-dev and protobuf-c-compiler:
sudo apt-get install libprotobuf-c0-dev protobuf-c-compiler

osm2pgsql will compile if the protobuf dependencies are not met, and simply issue a warning that is overlooked easily. The result is an osm2pgsql binary without PBF support.

answered 04 Feb '14, 10:23

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Yes, I have - this is why I don't understand why it doesn't work.

(04 Feb '14, 10:33) Speeder1612
1

Then take a look at the output of ./configure which is run via the autogen.sh script.

(04 Feb '14, 11:02) scai ♦

Source code available on GitHub .