I am using boost. I installed it using sudo apt-get install. Now I am unable to find my boost lib file on my filesystem.

I want to include the path of the lib in my Qt project. grepping is taking too long :( I found the includes in /usr/include/boost. But I also need to know the library path.

  • 1
    sudo apt-get install... what? – Eric Carvalho Mar 3 '13 at 14:59
  • 1
    @EricCarvalho libboost-dev – Chani Mar 3 '13 at 15:03

I'm not sure if this is what you're looking for, but you probably want to install libboost-all-dev.

$ ls /usr/lib/libboost*.so


If you are on a 64bit machine then you will probably find the files under /usr/lib/x86_64-linux-gnu/

See also this for an explanation of what this folder is for.


For me, the library path for boost was in /usr/lib64, and that's all I had to add to my library path for the code to build properly.

It's also entirely possible that the library's location was an arbitrary decision of a dev building my computer. Also note I'm not using Ubuntu, but Linux systems are similar enough that it doesn't matter much. My solution may very well not help anyone at all.

If locate is available to you on your system, then try these for locating boost:

locate boost | fgrep .so   #find lib files      (/usr/lib64 for me)
locate boost | fgrep .hpp  #find include files  (/usr/include for me)

libboost-dev depends on libboost1.46-dev (Ubuntu 12.04) or libboost1.49-dev (Ubuntu 12.10). Both packages also install a lot of files in /usr/share/boost-build/. Maybe it's what you're looking for.


To list all installed files for a package and the dependencies, use debfoster

sudo apt-get install debfoster

and a script like this. In this example I have used the package libboost-all-dev

debfoster -d libboost-all-dev |\
    awk '! /depends on/ {\
        for(i=1;i<=NF;i++) {\
            printf "\n>>> %s \n",$i; system("dpkg -L "$i)\

To list only the *.so files

debfoster -d  libboost-all-dev |\
    awk '! /depends on/ {\
        for(i=1;i<=NF;i++) {\
            printf "\n>>> %s \n",$i; system("dpkg -L "$i" | grep -P \".so($|\.)\"")\

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.