|
1 | | -# Install "Homebrew" |
| 1 | +# Homebrew |
2 | 2 |
|
3 | 3 | Homebrew is a tool that simplifies installing applications on your machine. Think of it like an app store for your computer. |
4 | 4 |
|
5 | 5 | --- |
6 | 6 |
|
7 | 7 | ## Verify if Homebrew is already installed |
8 | 8 |
|
9 | | -- In your terminal, run: `brew --version` |
10 | | - - _If output is similar to:_ `Homebrew 3.4.11` |
11 | | - - Run: `brew update` to get latest updates |
12 | | - - Move on to [next page](./4-git.md) |
13 | | - - _If output is not similar to the above_, continue with instructions on this page. |
| 9 | +**_If this is your first time going through the setup guide on your current machine, skip this "Verify" section and move on to the "Install" section below_** |
| 10 | + |
| 11 | +In your terminal, run: |
| 12 | + |
| 13 | +- `brew --version` |
| 14 | + |
| 15 | +> **IF** the output is similar to: |
| 16 | +> |
| 17 | +> ```text |
| 18 | +> Homebrew 3.4.11 |
| 19 | +> ``` |
| 20 | +> |
| 21 | +> Run the command: |
| 22 | +> |
| 23 | +> - `brew update` |
| 24 | +> |
| 25 | +> to get latest updates, and move on to the [next page](./4-git.md) |
| 26 | +> |
| 27 | +> --- |
| 28 | +> **else if** the output is not similar to the above: |
| 29 | +> |
| 30 | +> Continue with instructions on this page. |
14 | 31 |
|
15 | 32 | --- |
16 | 33 |
|
17 | | -In your terminal, enter the following command: |
| 34 | +## Install Homebrew |
18 | 35 |
|
19 | | -- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` |
20 | | -- You will be prompted several times along the way. Enter your password when prompted, accept all the defaults, say "Yes" if prompted. (**_Note:_** _You will not have any visual feedback on your screen as you type. It is protecting your password by not displaying ANYTHING at all to the screen, but it is registering your key strokes._) |
21 | | -- Once the main installation finishes (could take up to 30 minutes), **look at the output at the bottom of your terminal**. You may see an arrow pointing to "Next Steps" line with 2 commands. |
22 | | - |
23 | | - |
24 | | - |
25 | | -- Enter those commands, one at a time in your terminal - they should produce no errors, and do not produce success messages. |
26 | | - |
27 | | -- Then enter these commands, one at a time in your terminal - they should produce no errors, and do not produce success messages: |
28 | | - - `test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)` |
29 | | - - `test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)` |
30 | | - |
31 | | -Once the installation has completed, **run:** |
32 | | - |
33 | | -`brew doctor` |
| 36 | +In your terminal, run the following command: |
34 | 37 |
|
35 | | -**if** return output is: |
36 | | - |
37 | | -```bash |
38 | | -Your system is ready to brew |
39 | | -``` |
40 | | - |
41 | | -**or** return output is: |
42 | | - |
43 | | -```text |
44 | | -Please note that these warnings are just used to help the Homebrew maintainers |
45 | | -with debugging if you file an issue. If everything you use Homebrew for is |
46 | | -working fine: please don't worry or file an issue; just ignore this. Thanks! |
47 | | -``` |
48 | | - |
49 | | -**then run:** |
| 38 | +- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` |
50 | 39 |
|
51 | | -`brew update` |
| 40 | +You will be prompted several times along the way. |
52 | 41 |
|
53 | | -**else if** return output is: |
| 42 | +Enter your password when prompted, accept all the defaults, say "Yes" if prompted. (**_Note:_** _You will not have any visual feedback on your screen as you type your password. It is protecting your password by not displaying ANYTHING at all to the screen, but it is registering your key strokes._) |
54 | 43 |
|
55 | | -```bash |
56 | | -brew: command not found |
57 | | -``` |
| 44 | +Once the main installation finishes (could take up to 30 minutes), **look at the output at the bottom of your terminal**. You may see an arrow pointing to **"Next Steps:"** instructions. They would look similar to the image below. |
58 | 45 |
|
59 | | -**then** run these commands |
| 46 | + |
60 | 47 |
|
61 | | -1. `echo 'export BREW_HOME="/home/linuxbrew/.linuxbrew/bin"' >> $HOME/.zshrc` |
62 | | -1. `echo 'export PATH="$PATH:$BREW_HOME"' >> $HOME/.zshrc` |
63 | | -1. `reset` |
| 48 | +Run the commands shown in your terminal one at a time - they should produce no errors, and do not produce success messages. |
| 49 | +
|
| 50 | +Then run these commands, one at a time in your terminal - they should produce no errors, and do not produce success messages: |
| 51 | +
|
| 52 | +- `test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)` |
| 53 | +- `test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)` |
| 54 | +
|
| 55 | +Once that step is completed, **run:** |
| 56 | +
|
| 57 | +- `brew doctor` |
| 58 | +
|
| 59 | +> **IF** the return output is: |
| 60 | +> |
| 61 | +> ```text |
| 62 | +> Your system is ready to brew |
| 63 | +> ``` |
| 64 | +> |
| 65 | +> **OR** the return output is: |
| 66 | +> |
| 67 | +> ```text |
| 68 | +> Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! |
| 69 | +> ``` |
| 70 | +> |
| 71 | +> **then** run the command: |
| 72 | +> |
| 73 | +> - `brew update` |
| 74 | +> |
| 75 | +> --- |
| 76 | +> **else if** the return output is: |
| 77 | +> |
| 78 | +> ```text |
| 79 | +> brew: command not found |
| 80 | +> ``` |
| 81 | +> |
| 82 | +> **then** run these commands: |
| 83 | +> |
| 84 | +> - `echo 'export BREW_HOME="/home/linuxbrew/.linuxbrew/bin"' >> $HOME/.zshrc` |
| 85 | +> - `echo 'export PATH="$PATH:$BREW_HOME"' >> $HOME/.zshrc` |
| 86 | +> - `reset` |
| 87 | +> |
| 88 | +> and start the sequence over from the `brew doctor` step one more time |
| 89 | +
|
| 90 | +**If `brew doctor` still fails to run, [click here](../../error/error.md) and do not continue with the following steps until you have Homebrew properly installed** |
64 | 91 |
|
65 | | -> **If `brew update` still fails to run, [click here](../../error/error.md) and do not continue with the following steps until you have Homebrew properly installed** |
| 92 | +--- |
66 | 93 |
|
67 | | -## Install "gcc" |
| 94 | +## Install GCC |
68 | 95 |
|
69 | 96 | In order for Homebrew to install other applications, it needs a tool called **gcc** to assist itself. |
70 | 97 |
|
71 | 98 | Run this command in your terminal: |
72 | 99 |
|
73 | | -`brew install gcc` |
| 100 | +- `brew install gcc` |
74 | 101 |
|
75 | 102 | When that completes, you will be returned to the command prompt and can move on to the next steps. |
76 | 103 |
|
|
0 commit comments