"command not found: tshark" error on command line when wireshark app is already downloaded and running
Asked Answered
Z

1

7

I would like to use tshark from the command line. I have been using the Wireshark application on Mac OSX (10.15.3), but tshark in Terminal gave me the error:

command not found: tshark

I tried moving the tshark and tshark.dSYM files from the Package Contents of the application (Wireshark.app/Contents/MacOS/) to /usr/local/bin because of a comment I found online. Now I'm getting the error:

dyld: Library not loaded: @rpath/libwireshark.13.dylib
  Referenced from: /usr/local/bin/tshark
  Reason: image not found
zsh: abort      tshark

Seems like progress, but I'm not sure what other files need to be moved to where to be able to run tshark commands from Terminal?

Zoes answered 12/6, 2020 at 23:58 Comment(1)
What's the result of which tshark and which wireshark?Harhay
D
16

You can solve the problem by using symbolic links.
Create a symbolic link for tshark in /usr/local/bin as such.

ln -s /Applications/Wireshark.app/Contents/MacOS/tshark /usr/local/bin/tshark

Now if you run tshark -v you should see the current version of tshark installed

Dav answered 23/7, 2020 at 12:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.