1

I have tcpdump 4.9.2 on my Macbook installed and I compiled tcpdump 4.9.3 from source

./configure
make
make install

tcpdump 4.9.3 is in the folder

/Users/username/Documents/projects/tcpdump-tcpdump-4.9.3

make install gets me the following output:

[ -d /usr/local/sbin ] || \
(mkdir -p /usr/local/sbin; chmod 755 /usr/local/sbin)
/usr/bin/install -c tcpdump /usr/local/sbin/tcpdump
/usr/bin/install -c tcpdump    
/usr/local/sbin/tcpdump.`cat ./VERSION`
[ -d /usr/local/share/man/man1 ] || \
(mkdir -p /usr/local/share/man/man1; chmod 755   
/usr/local/share/man/man1)
/usr/bin/install -c -m 644 tcpdump.1  
/usr/local/share/man/man1/tcpdump.1

in /usr/local/sbin I find a file called tcpdump.4.9.3

/usr/local/sbin/tcpdump.4.9.3 --version
tcpdump.4.9.3 version 4.9.3
libpcap version 1.8.1 -- Apple version 79.250.1
SMI-library: 0.5.0

when I check with tcpdump --version

tcpdump --version
tcpdump version tcpdump version 4.9.2 -- Apple version    
83.200.2
libpcap version 1.8.1 -- Apple version 79.250.1
LibreSSL 2.2.7

Make install should set all the paths so I should be able to use 4.9.3 right?

with /usr/local/sbin/tcpdump.4.9.3 I can use 4.9.3 but I have to specify the path.

When I open the command line in the home folder and I check with: /usr/sbin/tcpdump --version

tcpdump version tcpdump version 4.9.2 -- Apple version 83.200.2
libpcap version 1.8.1 -- Apple version 79.250.1
LibreSSL 2.2.7

How do I remove 4.9.2 and make 4.9.3 global so that I can use tcpdump anywhere in the commandline?

dev
  • 651
  • 1
  • 6
  • 14
  • 1
    `./configure` sets the paths, I want `./configure --prefix=/usr` I believe. Default prefix is `/usr/local`. The best and most proper solution is to just uninstall tcpdump4.9.2 and install tcpdump4.9.3 package to `/usr/local` as it is and then add `/usr/local` to `PATH`. You can add `/usr/local/bin` in `PATH` in front of `/usr/bin`, so that your tcpdump will be picked first. – KamilCuk Oct 30 '19 at 12:55
  • I was not able to remove 4.9.2, I removed Wireshark but I can't remove tcpdump. I ran ./configure --prefix=/usr/local/sbin/tcpdump.4.9.3, make and make install but when I run tcpdump --version its still 4.9.2 – dev Oct 30 '19 at 13:24
  • 1
    Possible duplicate of [editing PATH variable on mac](https://stackoverflow.com/questions/7703041/editing-path-variable-on-mac), which should provide you with the information you need. – Ross Jacobs Oct 30 '19 at 18:38
  • It is absolutely not the responsibility of `make install` to modify your personal `PATH`. If you don't have `/usr/local/sbin` before `/usr/sbin` already then that's a bug in your personal preferences. – tripleee Oct 30 '19 at 18:42

0 Answers0