74

I've installed Wireshark(.org) using Homebrew.

brew install wireshark

at the end the script says

==> ./configure --prefix=/usr/local/Cellar/wireshark/1.2.7 --disable-dependency-tracking --disable-wireshark
==> make
==> make install
==> Caveats
We don't build the X11 enabled GUI by default
==> Summary
/usr/local/Cellar/wireshark/1.2.7: 167 files, 50M, built in 5.4 minutes

I'm not able to find the 'wireshark' GUI.
Any idea of how to build it?

Thanks

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
miku8
  • 841
  • 1
  • 6
  • 3

8 Answers8

106
$ brew options wireshark

Shows you options for wireshark, which lists --with-qt5. QT is the GUI toolkit that Wireshark uses since 1.10. Thus, install wireshark using the following command:

$ brew install wireshark --with-qt5

Or if you already have wireshark previosly:

$ brew reinstall wireshark --with-qt5

If you do not add this option the commandline tool tshark will be installed.

jonchang
  • 1,256
  • 1
  • 8
  • 6
  • 8
    Note that beginning with Wireshark `1.10.0` QT is used instead of GTK. So you can use the option `--with-qt` – hanxue Oct 21 '13 at 15:00
  • 8
    `brew reinstall wireshark --with-qt` – lsl May 17 '14 at 12:56
  • 16
    First time I've ever had a formula not install by default. It would be better if there was a `--without-gui` instead of blindly continuing without any GUI which most who install wireshark are probably expecting. – Sukima Aug 06 '14 at 16:44
  • @hanxue how do I run it after installing it? – Zoltán Sep 03 '15 at 14:15
  • I used the `reinstall` command, but to make it work I had to re-create the symlinks as explained in this [github issue](https://github.com/Homebrew/legacy-homebrew/issues/32305#issuecomment-137328711): rm '/usr/local/bin/wireshark' && brew link --overwrite wireshark – subelsky Jul 11 '16 at 20:19
  • Just thought I'd add it appears the recommended option is now ```--with-qt5```. I received this warning when trying as defined above: *Warning: wireshark: --with-qt was deprecated; using --with-qt5 instead!* – Slump Sep 06 '16 at 17:03
9

The new approach is to use brew install wireshark --with-qt.

The --with-x option no longer works.

More details on the switch to QT: https://blog.wireshark.org/2013/10/switching-to-qt/

Paul Wenzel
  • 191
  • 1
  • 4
4

Well, the system did warn you that it wouldn't install the X11 GUI. So maybe there is an option in the configuration phase that enables it? You'd need a whole extra set of stuff to run X11.

At http://www.wireshark.org/download.html there is a binary downstaller you could use...

Henno
  • 659
  • 4
  • 5
  • Thanks for your response. I've X11, I just don't understand what I'm missing. I should build wireshark gui in some way I suppose... no mention of how to do it with homebrew. this is the script 'http://github.com/mxcl/homebrew/blob/master/Library/Formula/wireshark.rb' sorry I'm newbie – miku8 May 29 '10 at 14:58
  • Do it without the --disable-wireshark in the script. So edit the script... Maybe you'll get a problem with dependencies as well, so you could remove the --disable-dependency-tracking as well, but then of course you could get errors as well.... You do know that at the wireshark site there is a complete binary build of wireshark, installer and all ? That's a lot easier. – Henno May 29 '10 at 17:53
3

There is a Mac .dmg app installer from the http://www.wireshark.org website. You must wait a while for it to start X11. It will seem as though it is not working, but the app is just very slow.

2

At some point, a cask formula was added. So the following command will actually install Wireshark, with the UI, as a regular app:

brew cask install wireshark

And you can then find it in Applications or via Spotlight.

mherzig
  • 121
  • 3
1

You appear to have disabled the building of the GUI with the --disable-wireshark option to the configure script .

You need to clean up from the previous build, run configure without the --disable-wireshark and then rebuild.

Unfortunately I can't help you do this on your OS as I have no knowledge of it.

1

For those coming from Google in 2022, you're gonna want to try the following:

brew install wireshark --cask
Aaron_H
  • 111
  • 3
1

My reputation is too low to comment on @jonchang's answer, and I realize that this is old, but in case others find this...

brew install wireshark --with-qt

as indicated in @jonchang's answer worked for me (use brew reinstall wireshark --with-qt, as mentioned by @Louis if you've already installed wireshark without qt).

As for running it, it doesn't install an OS X application, but you should then be able to run qt from the command line:

/usr/local/Cellar/wireshark/{{version}}/bin/wireshark-qt