Install Wireshark on MacOS X via brew

MacosHomebrewWireshark

Macos Problem Overview


I installed Wireshark on my mac with the command

brew install wireshark

but after that, a message told me that I had to curl and install ChmodBPF, so I did that too.

But there is no command named Wireshark on terminal. What is wrong with that?

Macos Solutions


Solution 1 - Macos

The homebrew package wireshark installs the command line util tshark. If you want to enable the GUI, then install wireshark like this:

brew install wireshark --with-qt

If you already have Wireshark installed, do

brew reinstall wireshark --with-qt

Solution 2 - Macos

I suggest using cask to create the .app binary in your /Applications folder (use reinstall if already installed):

brew install --cask wireshark

The advantage of this approach over brew install wireshark --with-qt is that more features are enabled without spending a lot of time compiling.

This is also the recommended approach for graphical applications and will use the official, feature-complete builds as distributed by the Wireshark developers.

Solution 3 - Macos

I don't think the command brew install wireshark --with-qt works anymore as of July 2019 on my laptop running macOS Mojave. So my approach to install Wireshark using Homebrew is to follow the below steps:

  1. Update Homebrew: `brew update'
  2. Tap the Caskroom/Cask GitHub repository using HTTPS: brew tap caskroom/cask
  3. Search all known casks for wireshark: brew search wireshark
  4. Find out info about the wireshark cask (to be sure): brew info --cask wireshark
  5. Install the wireshark cask: brew install --cask wireshark
  6. Clean up (just in case): brew cleanup

If all goes well, one should see 🍺 wireshark was successfully installed! after Step 5.

Solution 4 - Macos

I found that I asked wrong question! Wireshark is gui that use tshark or ... at the back and when I install with brew, it install tshark and ... So that is reasonable that I could not found wireshark in terminal but I could find tshark!

Solution 5 - Macos

The command works perfectly

 brew install --cask wireshark

and install the interface via

brew install --cask wireshark-chmodbpf

link to the homebrew page

https://formulae.brew.sh/formula/wireshark

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAryanView Question on Stackoverflow
Solution 1 - MacosAllan BeaufourView Answer on Stackoverflow
Solution 2 - MacosRaduView Answer on Stackoverflow
Solution 3 - MacosKris SternView Answer on Stackoverflow
Solution 4 - MacosAryanView Answer on Stackoverflow
Solution 5 - Macoslearn webtechView Answer on Stackoverflow