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

Errors in osmium installation

0

I am trying to get osmium examples running as per instructions (https://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%


One Answer:

1

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

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

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

Source code available on GitHub .