Homebrewで「'conflicts_with' stanza failed with: Calling conflicts_with formula: is disabled! There is no replacement.」エラーが発生する
macOSのパッケージマネージャであるHomebrewでアップデートを実行すると以下のエラーが表示されるようになりました。wireshark-appが何か問題を起こしているようです。
'conflicts_with' stanza failed with: Calling conflicts_with formula: is disabled! There is no replacement.
検証環境¶
| 対象 | バージョン |
|---|---|
| macOS | Tahoe 26.1 |
| Homebrew | 5.0.1 |
| Wireshark | 4.6.0 |
私の環境には予めWireshark4.6.0がインストールされています。

実際のエラー¶
brew updateを実行した際のエラーは以下です。
% brew update
・
・
・
You can upgrade it with brew upgrade
or list it with brew outdated.
Error: Cask 'wireshark-app' definition is invalid: 'conflicts_with' stanza failed with: Calling conflicts_with formula: is disabled! There is no replacement.
brew doctorで診断しても何も表示されません。
% brew doctor
Your system is ready to brew.
wireshark-appを再インストールする¶
brew reinstall --cask wireshark-appを実行してwireshark-appを再インストールしてみます。しかし、エラーは解消しませんでした。
% brew reinstall --cask wireshark-app
==> Fetching downloads for: wireshark-app
✔︎ Cask wireshark-app (4.6.0) [Verifying 141.1MB/141.1MB]
Error: Cask 'wireshark-app' definition is invalid: 'conflicts_with' stanza failed with: Calling conflicts_with formula: is disabled! There is no replacement.
--forceオプションを指定しても、やはり駄目でした。
% brew reinstall --cask --force wireshark-app
==> Fetching downloads for: wireshark-app
✔︎ Cask wireshark-app (4.6.0) [Verifying 141.1MB/141.1MB]
Error: Cask 'wireshark-app' definition is invalid: 'conflicts_with' stanza failed with: Calling conflicts_with formula: is disabled! There is no replacement.
Homebrewのディレクトリを確認する¶
Homebrewのディレクトリ(/opt/homebrew)配下でWiresharkのディレクトリを確認してみます。すると(インストール済みの4.6.0では無く
)バージョン4.4.2のディレクトリが存在しているようです。思い返すと、この環境はWiresharkをHomebrew経由でインストールしているにも関わらず、4.6.0では自分でアプリケーションをダウンロードしてインストールしてしまった記憶があります… orz
% ls -al /opt/homebrew/Caskroom/wireshark-app
total 0
drwxr-xr-x 4 user admin 128 6月 24 07:25 ./
drwxrwxr-x 32 user admin 1024 10月 19 21:15 ../
drwxr-xr-x 5 user admin 160 6月 24 07:25 .metadata/
drwxr-xr-x 10 user admin 320 6月 24 07:25 4.4.2/
アプリケーションを削除し、再インストールし直す¶
アプリケーション(/Applications)ディレクトリから手動でインストールしたWiresharkを削除し、その上で下記を実行することでエラーが解消しました。
brew reinstall --cask --force wireshark-app