Mac OS X Lionでmacportを使ってBoostをインストールしようとすると、なぜか失敗する
Mac OS X Lionでmacportを使って、
> sudo port install jam > sudo port install boost
とBoostをインストールしようとすると、なぜか以下のエラーが発生する:
:info:activate bzip2: Compressed file ends unexpectedly; :info:activate perhaps it is corrupted? *Possible* reason follows. :info:activate bzip2: Undefined error: 0 :info:activate Input file = /opt/local/var/macports/software/boost/boost-1.48.0_4.darwin_11.x86_64.tbz2, output file = (stdout) :info:activate :info:activate It is possible that the compressed file(s) have become corrupted. :info:activate You can use the -tvv option to test integrity of such files. :info:activate :info:activate You can use the 'bzip2recover' program to attempt to recover :info:activate data from undamaged sections of corrupted files. :info:activate :info:activate :info:activate tar: Truncated tar archive :info:activate tar: Error exit delayed from previous errors. :info:activate shell command "/usr/bin/bzip2 -d -c /opt/local/var/macports/software/boost/boost-1.48.0_4.darwin_11.x86_64.tbz2 | ( /usr/bin/tar -xvpf - )" returned error 1 :error:activate Target org.macports.activate returned: shell command failed (see log for details) :debug:activate Backtrace: shell command failed (see log for details)
ログに描かれているとおり、
> sudo bzip2recover /opt/local/var/macports/software/boost/boost-1.48.0_4.darwin_11.x86_64.tbz2
と実行してから再度インストールを実行しても、結果は変わらず。
そこで、無理矢理な感がある&リビジョン(?)は違うものの、macportのサイトからboost-1.48.0_4.darwin_10.x86_64.tbz2をダウンロードし、これをboost-1.48.0_4.darwin_11.x86_64.tbz2にリネームして、/opt/local/var/macports/software/boost/ディレクトリ下に配置。
再度インストールを実行したら、正しくインストール出来た。