Installed application using brew, but now it's saying it can't find it?

Solution 1:

Dsniff links its programs in to /usr/local/sbin instead of /usr/local/bin. The sbin/ directory is for more sysadmin-oriented stuff and isn't on the path for non-root accounts. Most other Homebrew formulae don't link there.

Dsniff will even warn you about this during the installation.

$ brew install dsniff
==> Downloading http://monkey.org/~dugsong/dsniff/beta/dsniff-2.4b1.tar.gz
#
[ ... ]
==> make install
Warning: /usr/local/sbin is not in your PATH
You can amend this by altering your ~/.bashrc file
==> Summary
/usr/local/Cellar/dsniff/2.4b1: 35 files, 420K, built in 11 seconds

So, add /usr/local/sbin to your path in the same place that you add /usr/local/bin, probably in ~/.bashrc, and you'll pick up dsniff.

In general, when you run in to things like this, and you're not sure where the files went, you can use find to search for them. For Homebrew, they'll always be somewhere under /usr/local, if they're anywhere.

$ find /usr/local -name dsniff
/usr/local/Cellar/dsniff
/usr/local/Cellar/dsniff/2.4b1/sbin/dsniff
/usr/local/Library/LinkedKegs/dsniff
/usr/local/opt/dsniff
/usr/local/sbin/dsniff

Solution 2:

You can try manually linking the executable dsniff.

ln -s /usr/local/Cellar/dsniff/2.4b1/dsniff /usr/local/bin/dsniff

This creates a link back to the original file in Cellar, but your shell will be able to find it in its path, because /usr/local/bin is usually in it.

After doing so, you can call dsniff from anywhere.

Solution 3:

If anyone else is having issues and their $PATH variable is already fine, I'd suggest:

brew unlink dsniff
brew link dsniff

This worked for me when I had a similar issue.