1. Open the following link http://brew.sh/
2. Once the page is open you will see a language option, set your preferred language.
3. Below the language preference you will see the following.
4. Highlight the text in the black box and click “Command C” on your keyboard.
5. Once you have copied this open a window in “Finder”.
6. In finder click “Applications” (This is located on the left below “Favorites”).
7. Scroll to the bottom of applications and locate the folder named “Utilities” and double click on it.
8. At the bottom of the page open “Terminal”.
9. Once terminal is open click “Command V” on your keyboard and hit enter two times.
10. After you hit enter it will ask for your computer password. (You won't see the characters type)
11. Once the install is complete type “brew install mtr” and hit enter.
12. Once the install is complete type “sudo mtr”.
13. A new window should open that looks like the following.
14. If this window opens, then you have successfully installed Homebrew. If this window does not open, please Refer to Section A.
A. “Command not found” error when attempting “sudo mtr”. (These are case Sensitive commands)
- Type “sudo su – “ in the terminal line and hit enter.
- You should now see “root#” before the terminal line.
- Type “ls /usr/local/” in the terminal and hit enter.
- Now hit the “Up” arrow on your keyboard. Doing this should retype the same command that was in Step 3.
- Now type “C” and hit “Tab” on your keyboard. Your command line should now look like the following “ls /usr/local/Cellar/”.
- Hit “Tab” two more times and hit enter.
- Click “Control D” on your keyboard.
- Type “sudo ln /usr/local/Cellar/mtr/0.87/sbin/mtr /usr/local/bin/mtr” in the command line and press enter.
- This should return “File exists”.
- Please refer back to Step 12 in the install directions.
B. “Command not found” error when attempting “sudo mtr”: Updating the PATH environment variable for MTR 0.92. (These are case Sensitive commands)
- Locate the installation directory for the mtr and mtr-packet executables. These will typically reside in the /usr/local/Cellar/mtr/0.92/sbin directory. Confirm this by using the command “cd /usr/local/”, followed by “ls” to list the contents of the directory. Use “cd <directory>" iteratively until you navigate through available sub-directories until you reach a point where the directory contents are just mtr and mtr-packet. You can use the “pwd” command to show the full directory path to your current location.
- The reason why “Command not found” may be returned when attempting “sudo mtr” is that the PATH environment variable for your terminal does not include the installation directory named in Step 1 above. The PATH environment variable defines the list of directories in your file system to look in for appropriate executable files to run. The PATH environment variable can be updated and additional directories listed in a terminal session profile file called .bash_profile. Look for this file when you first bring up a terminal session by issuing the command “ls -al | grep bash_profile”. Look at the contents of the file by issuing the command “cat .bash_profile”. We will want to update any configuration line in the .bash_profile file which defines the PATH environment variable.
- Use the text editor of your choice to edit the .bash_profile file. Update the PATH definition line to include the installation directory you found in Step 1. Use a colon (:) to separate the directory you are adding from other directory listings in the definition line. The definition line in the example below says that the new value of the PATH environment variable should include /usr/local/Cellar/mtr/0.92/sbin, /opt/local/bin, /opt/local/sbin, and any existing value of PATH.
- If the .bash_profile file does not exist already, you can create the file by issuing the command “touch .bash_profile” to create the file. Edit the new .bash_profile file using your preferred text editor, and use the definition “export PATH="/usr/local/Cellar/mtr/0.92/sbin:$PATH" to update the PATH environment variable.
- After completing the steps above, each time you bring up a terminal session the PATH environment variable will include the installation directory for the mtr and mtr-packet executables. You should no longer generate the “Command not found” error when attempting to use “sudo mtr”.