Manually installing Boost 1.55 on OSX

Posted on Sun 19 October 2014 in tech

Boost 1.56.0 which is currently installed by homebrew is broken. Just try to compile the following C++ program. It will fail.

#include <boost/graph/adjacency_matrix.hpp>

int main() {

Here are the steps to manually install Boost 1.55:

  • Download Boost 1.55 here
  • Extract the source and cd into the directory
  • Compile: ./ && ./b2
  • Create a directory where Boost will be installed: mkdir /usr/share/boost
  • Install: ./b2 install --prefix=/usr/share/boost/
  • Link the include files to /usr/local/include: ln -s /usr/share/boost/include/boost /usr/local/include

You might need administrator privileges for the last three steps.