I need to link with some of Boost's shared library (.so) files. I have installed boost by running

sudo apt-get install libboost-all-dev

The header files and static libraries are installed correctly. The shared libraries are also installed however they contain no symbols.

$ nm /usr/lib/x86_64-linux-gnu/libboost_filesystem.so
nm: /usr/lib/x86_64-linux-gnu/libboost_filesystem.so: no symbols

How is this possible and how can I fix it? I understand that this is a vague issue, but I have tried apt-get clean and completely removing and purging all boost debian packages and reinstalling and I always get the same result. Compiling Boost from source and installing a separate version is not ideal.

  • Linking with Boost should not require that you read the symbol table. Shared libraries installed from the Ubuntu repositores are stripped and do not contain symbols. Is there a real problem that you are encountering or is your question really why are there no symbols? Commented May 8, 2014 at 14:19

2 Answers 2


Most shared libraries installed from the Ubuntu repositories do not contain symbols. Packages are typically built with debug symbols, which are then stripped and put into separately installable packages for use with gdb or other debuggers.

If you want to see the symbols in a shared library's dynamic symbol table, which are the public symbols that can be linked with, use nm -D instead of just nm.


I had that same problem with other library (libcudart.so). I solved it using an static '.a' library.

What I did:

$ find /usr/local/cuda-7.0 -type f -name libcudart\*
$ compiler -Ldirectory -lcudart_static

I hope this helps someone

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .