title: How to install boost in OSX
body: <p>What I have done before:</p>
  
  <p>(1) download .tar</p>
  
  <p>(2) unzip</p>
  
  <p>(3) cd to the path</p>
  
  <p>(4) ./bootstrap.sh</p>
  
  <p>(5) wait until:</p>
  
  <pre><code>The Boost C++ Libraries were successfully built!
  
  The following directory should be added to compiler include paths:
  
  /Users/lvzhi107/Downloads/boost_1_57_0
  
  The following directory should be added to linker library paths:
  
  /Users/lvzhi107/Downloads/boost_1_57_0/stage/lib
  </code></pre>
  
  <p>(6) ./b2 install </p>
  
  <p>but it shows :</p>
  
  <pre><code>...failed common.copy /usr/local/lib/libboost_wave.a...
  ...failed updating 65 targets...
  ...skipped 11349 targets...
  </code></pre>
  
  <p>then I wrote a code:<code>test.cpp</code></p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;boost/format.hpp&gt;
  int main()
  {
      boost::format("hello world");
  }
  </code></pre>
  
  <p>run it using g++:<code>g++ test.cpp</code>
  but it still wrong:</p>
  
  <pre><code>test.cpp:2:9: fatal error: 'boost/format.hpp' file not found
  #include&lt;boost/format.hpp&gt;
          ^
  1 error generated.
  </code></pre>
  
  <p>Could you tell me how to solve it?Thanks.</p>