I have installed an application (dsniff) using brew, but when I try to run it I get a "Command not found" error. I even tried going to the directory it was installed to:
/usr/local/Cellar/dsniff/2.4b1/sbin/
confirming that it was there (it is) and running it, but I get the same error. Any idea why this would happen?
Best Answer
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.
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.