MacOSXでBrewを使用して特定のバージョンのBoostをインストールする方法は?

MacOSXでBrewを使用して特定のバージョンのBoostをインストールする方法は?

"brew install Boost"コマンドは私のMacOSXで動作しますが、最新のBoost 1.57をインストールします。 Brewを使用して古い1.55をインストールする方法は?

答え1

君は走りたいだろbrew install [email protected]

$ brew search boost
==> Formulae
boost ✔                           boost-build                       
boost-python                      [email protected]                 
[email protected]                        [email protected]
boost-bcp                         boost-mpi                     
boost-python3                     [email protected]                        [email protected]

==> Casks
boostnote                                focus-booster                            
iboostup                                 nosqlbooster-for-mongodb                 
turbo-boost-switcher

答え2

別の考えられる解決策は、ソースから正確なバージョンを手動でコンパイルすることです。
以下を行います。

  1. .tar.gzの正確なバージョンを以下からダウンロードしてください。https://boostorg.jfrog.io/ui/native/main/release

  2. 解凍し、次のディレクトリに入ります。

    tar -xzf boost_1_50_0.tar.gz
    cd boost_1_50_0

  3. 構成(およびビルドbjam):

    ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.54.0
  4. 立てる:

    ./b2
  5. 取付ける:

    ./b2 install

関連情報