0

I currently have Wireshark 2.6.8 and 3.0.2 installed on Ubuntu 18.04, and I would like to be able to use editcap as included in the 3.0.2 installation to modify pcap files.

However, every time I run editcap (a simple editcap -h to verify the build that I am using) from the terminal, it shows that I am running it from Editcap (Wireshark) 2.6.8 (Git v2.6.8 packaged as 2.6.8-1~ubuntu18.04.0)

Is there a way to change this without removing Wireshark 2?

Lyndon
  • 31
  • 4
  • it might be helpful to know that i installed 2.6.8 from a mirror using apt-get, and the 3.0.2 was built from source. I was able to run WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 ./run/editcap and this worked. – Lyndon Jul 22 '19 at 13:13
  • What does the command `which editcap` print? And did you install Wireshark 3.0.2 by running `make install` after building Wireshark from source? If so, is there a `/usr/local/bin/editcap` file? – user9065877 Aug 03 '19 at 02:39
  • which editcap returns /usr/bin/editcap. I did, though there is no usr/local/bin/editcap file; only in usr/bin/editcap. I'm not sure if it's a path issue, but the fact that i have to select WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 is a little bit telling; not sure how to fix it though – Lyndon Aug 05 '19 at 08:58
  • > which editcap returns /usr/bin/editcap – user9065877 Aug 14 '19 at 19:27

1 Answers1

0

there is no usr/local/bin/editcap file

Then the only version of Wireshark you have installed appears to be the 2.6.8 version.

the 3.0.2 was built from source

You may have built the 3.0.2 version from source, but, unless you ran "make install" (or "ninja install" if you used Ninja rather than make), you haven't installed it. You may have to run that as root.

Once you've installed the version you built from source, there should be a /usr/local/bin/editcap (unless you've explicitly configured the build to install somewhere other than the default location).

user9065877
  • 193
  • 1
  • 1
  • 2
  • >>>(unless you've explicitly configured the build to install somewhere other than the default location) I did, under the impression that i would be able to maintain backward compatibility for some of scripts that depended on commands found in tshark 2.6.8 – Lyndon Aug 15 '19 at 10:11
  • Then you will either need to make sure that the `bin` directory of the install location is in your `$PATH` - for example, if you installed under `/opt`, the `bin` directory would be `/opt/bin` - or will need to explicitly give the full path to the version of `editcap` in that directory (`/opt/bin/editcap` in the example). Adding the install directory's `bin` directory to `$PATH` runs the risk of breaking scripts, if they run a command and get the installed-from-source version rather than the installed-from-APT version. – user9065877 Aug 18 '19 at 01:46