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?
Then the only version of Wireshark you have installed appears to be the 2.6.8 version.
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).