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

I am trying to get osmium examples running as per instructions (http://wiki.openstreetmap.org/wiki/Osmium/Quick_Start), but compilation of the examples fails with errors:

g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -DOSMIUM_WITH_OUTPUT_OSM_XML -I/usr/include/libxml2 -o osmium_convert osmium_convert.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf -lxml2
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_debug osmium_debug.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_store_and_debug osmium_store_and_debug.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_find_bbox osmium_find_bbox.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_progress osmium_progress.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_range_from_history osmium_range_from_history.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -DOSMIUM_WITH_OUTPUT_OSM_XML -I/usr/include/libxml2 -o osmium_sizeof osmium_sizeof.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf -lxml2
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_stats osmium_stats.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf -lsqlite3
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o osmium_time osmium_time.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf
make: gdal-config: Command not found
make: gdal-config: Command not found
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -DOSMIUM_WITH_OGR  -o osmium_toogr osmium_toogr.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf 
osmium_toogr.cpp:31:25: fatal error: ogrsf_frmts.h: No such file or directory
compilation terminated.
make: *** [osmium_toogr] Error 1

System is Ubuntu Oneiric (but I can switch to any other Debian or Ubuntu version if recommended). Is someone able to help me figure out what is going wrong?

asked 12 Apr '12, 15:37

g0ldfish's gravatar image

g0ldfish
1111
accept rate: 0%


As it says in the README you need gdal installed for OGR support:

GDAL (for OGR support) http://gdal.org/ Debian/Ubuntu: libgdal1-dev

permanent link

answered 12 Apr '12, 16:45

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

I actually found out last week (searching for "gdal-config: Command not found"), but my comment obviously had not been processed.

May I add the package to debian/ubuntu example command on the wiki page about quick start?

(16 Apr '12, 13:16) g0ldfish

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×61
×38
×30

question asked: 12 Apr '12, 15:37

question was seen: 9,149 times

last updated: 16 Apr '12, 13:16

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