Installing and using Matt’s Traceroute ( MTR ) on MAC OS X Mountain Lion ( 10.8.5 )

January 21, 2014

MTR is a really nice utility when networks are really not working properly and understanding the normal traceroute is not revealing right information. On MAC OSX the utility is not directly available and either you need to download the source from BITWIZARD and than compile it or you can use the following method.

First of all you will need to install Apple’s Command Line Developer Tools. Download them here and install them. This is a less than 100MB file and contains a lot of very useful utilities you will need to program over in MAC OS X and thus installing them is really recommended. GCC would not run without them and installing anything isn’t really possible without them if they are not packaged as MAC OS X binaries.

Install Command Line Apple Developer Tools

Install Command Line Apple Developer Tools

Next you need to install HomeBrew from here. HomeBrew is a package manager and will help you one click install a lot of utilities you might need in future. Therefore just go for it.

Use the following command to install it.

ruby -e "$(curl -fsSL"

Screen Shot 2014-01-22 at 12.02.47 AM


Do not forget to run Brew Doctor to avoid configuration issues that may come up so let Brew Doctor resolve them first before you install anything.

brew doctor


After that when you have installed it all you need to do is this –

brew install mtr

That should install MTR ( Matt’s TraceRoute for you ). If you encounter any linking errors from HomeBrew just follow the instructions coming on the console and it should go fine with it.

If you can not call MTR directly from terminal you can use the below path

cd /usr/local/Cellar/mtr/0.85/sbin

Edit the path accordingly to your version number and using ./mtr should run it fine.

If you get the error

mtr: unable to get raw sockets.

Than you should do this

sudo ./mtr <IP/Domain>

MTR Mac OS X Traceroute

MTR Mac OS X Traceroute

If any other problem comes in please send in a comment and I will try to help you with it. I hope you like MTR’s functionality and are able to find bottlenecks within your network.



September 22, 2014 @ 2:25 pm

Thanks for any other excellent article. Where else may anyone get that kind of information in such
an ideal way of writing? I’ve a presentation next week,
and I am at the look for such info.

    November 8, 2014 @ 2:30 am

    Thanks a lot, I will love to add more for you people.

January 8, 2015 @ 1:34 pm

Hi there, thanks for posting this.

After getting the:
mtr: unable to get raw sockets.

error, I tried this:
sudo ./mtr

and was told this:
-bash: syntax error near unexpected token `newline’

Am I doing something wrong?

    May 1, 2016 @ 12:16 pm

    You should use sudo with the command. Unless you run it with sudo it will show you the same error.

February 26, 2015 @ 2:57 am

The location of Homebrew changed: This is the new link
ruby -e “$(curl -fsSL”

May 27, 2015 @ 12:30 pm

Thanks, that is helpful.

Do you also know, how to make mtr usable from anywhere, without going into brews Cellar?
And maybe even without sudo?

    May 1, 2016 @ 12:17 pm

    Without sudo it might not work. You can add a softlink to /usr/bin and make it available I think

February 1, 2016 @ 7:41 pm

I had it running up until I upgraded to El Capitan. Since then, I cannot get it reinstalled.

    May 1, 2016 @ 12:17 pm

    Did you update your brew install to El Capitan ?


Leave a Reply

Your email address will not be published. Required fields are marked *