So you went and installed mtr
via the Brew package manager, only to find it doesn’t really work? Bummer. Good thing there’s a fix.
$ mtr ma.ttias.be host: ma.ttias.be mtr: unable to get raw sockets.
But the sudo
variant does work:
$ sudo mtr ma.ttias.be 1.|-- 10.200.200.200 0.0% 1 14.4 14.4 14.4 14.4 0.0 2.|-- 10.0.1.1 0.0% 1 17.7 17.7 17.7 17.7 0.0 3.|-- ge-0-0-24-605.rtr1.ant1.n 0.0% 1 14.7 14.7 14.7 14.7 0.0 4.|-- ge-0-0-20-2.csw01.ocs.ant 0.0% 1 15.5 15.5 15.5 15.5 0.0 5.|-- ma.ttias.be 0.0% 1 15.5 15.5 15.5 15.5 0.0
Having to sudo
every time is a bit of a pain, so we can use the magic setuid bit that allows us to execute mtr
without additional hassle.
$ which mtr /usr/local/sbin/mtr $ chmod 4755 /usr/local/sbin/mtr $ sudo chown root /usr/local/sbin/mtr
Now, next time you execute mtr
, it’ll just work. It’s like magic.