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

Following http://wiki.openstreetmap.org/wiki/Osmium/Quick_Start on Ubuntu 10.04 LTS with libprotobuf-dev installed gives lots of "/usr/bin/ld: cannot find -lprotobuf-lite" errors.

OSM-binary can be compiled using the non-Debian/Ubuntu instructions (e.g. make instead of debuild), but make osmium/examples still fails looking for -lprotobuf-lite

Changing LDFLAGS on line 26 of Makefile to /usr/lib doesn't seem to help

user@ireem:~$ ls  /usr/lib/libprotobuf*
/usr/lib/libprotobuf-c.a         /usr/lib/libprotobuf-lite.so.5
/usr/lib/libprotobuf-c.so        /usr/lib/libprotobuf-lite.so.5.0.0
/usr/lib/libprotobuf-c.so.0      /usr/lib/libprotobuf.so
/usr/lib/libprotobuf-c.so.0.0.0  /usr/lib/libprotobuf.so.5
/usr/lib/libprotobuf.la          /usr/lib/libprotobuf.so.5.0.0

user@ireem:~/osm/osmium/libosmpbf/osmium/examples$ make clean
rm -f *.o core osmium_sizeof osmium_debug osmium_stats osmium_find_bbox osmium_time osmium_progress osmium_convert osmium_toogr osmium_toshape nodedensity
user@ireem:~/osm/osmium/libosmpbf/osmium/examples$ make
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/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf -lxml2
/usr/bin/ld: cannot find -lprotobuf-lite
collect2: ld returned 1 exit status
make: *** [osmium_sizeof] Error 1

asked 11 Sep '11, 13:33

OJW's gravatar image

OJW
1518815
accept rate: 0%

edited 11 Sep '11, 13:42


You seem to be missing /usr/lib/libprotobuf-lite.so. Do this:

cd /usr/lib

ln -s libprotobuf-lite.so.5 libprotobuf-lite.so

permanent link

answered 11 Sep '11, 13:46

Derick%20Rethans's gravatar image

Derick Rethans
247123
accept rate: 50%

1

Note that this seems to be a bug in the Ubuntu libprotobuf-dev package as it should contain that link but doesn't - this should really be reported to the maintainer of that package.

(11 Sep '11, 14:50) TomH ♦♦

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:

×38
×10

question asked: 11 Sep '11, 13:33

question was seen: 8,154 times

last updated: 11 Sep '11, 15:41

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