brew pin で アップデート対象から除外する。
brew pin ffmpeg brew pin imagemagick
などで、brew の自動アップデート対象から外してしまう。
python や ruby が brew のパッケージを前提にビルドしていると、時々困る。dyld エラー・・・
セキュリティパッチを取り込み損ねるため、本当は駄目だ。けど、いちいち brew で時間を取られるのも勘弁願う。
brew pin / unpin
brew の公式サイトに解説がある。
https://docs.brew.sh/Manpage#pin-installed_formula
pin installed_formula […] Pin the specified formula, preventing them from being upgraded when issuing the brew upgrade formula command. See also unpin. unpin installed_formula […] Unpin formula, allowing them to be upgraded by brew upgrade formula. See also pin.
pin 済み一覧を見る。
現在のpin済みの一覧を見るには
brew list --pinned
これで現在のpin済みの一覧を見ることができる。
私の環境での例
takuya@ $ brew list --pinned ffmpeg imagemagick php@7.4 php@8.0 poppler-qt5
ビルドに時間がかかったり、依存モジュール被依存モジュールが多いものをpinしてしのいである。
どういうときに便利か
一時的にMacOS の古いバージョンを使っていて、そのバージョンで brew をしている場合。
brew で old package は ビルド済みが提供されない・ビルドして時間を書けても、brew は自動更新を前提とするので、ビルド地獄になる。
このように ビルド アンド ビルドなるが、おまえのmacOS古いぞと言われるとき、でもそのバージョンがいいんだ。ってときの延命策として使えそうだ。
Warning: A newer Command Line Tools release is available. Update them from Software Update in System Preferences or run: softwareupdate --all --install --force If that doesn't show you any updates, run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --install Alternatively, manually download them from: https://developer.apple.com/download/all/. You should download the Command Line Tools for Xcode 11.3.1.
時間ができたらmacOSアップデートしたいんだけど、まだそこまで準備が整ってない。32bitどうするんだ。・・・