Ubuntu – Why are boost package libs installed to /usr/lib/x86_64-linux-gnu

boostfilesystemlibraries

After running

sudo apt-get install libboost-all-dev

on ubuntu 14.04 amd64 desktop (Trusty Tahr), I found that all the libs are installed into

/usr/lib/x86_64-linux-gnu/

instead of

/usr/lib/

Although all the headers are still installed into

/usr/include/

Why does this happen?

Best Answer

The library packages have been made multiarch, meaning that you can simultaneously install both the amd64 version and the i386 version on an amd64 computer. If you want to install the i386 version of a library, suffix the package name with :i386. (For example, sudo apt-get install libboost-system1.54.0:i386)

Library packages are shifting towards becoming multiarch, so that it is a little easier to install packages from other architectures and run programs compiled for other architectures.

Related Question