Homebrew documents /opt/homebrew as the default prefix on Apple Silicon and /usr/local on Intel Macs (installation guide). If Homebrew is installed but brew is not found, verify the actual prefix and the shell running in the affected terminal, then load the matching shellenv configuration. If only some terminals fail, inspect their startup files. Don’t reinstall first or use sudo to conceal a path problem.
Who should use this runbook: Graduate researchers whose terminal cannot find brew or a research-tool command after installation.
University lab support staff comparing shell and account behavior across terminals or SSH sessions.
Research groups without a local Mac that need to check whether a remote macOS environment can support a project dependency.
Last updated November 21, 2026. We checked the guidance against Homebrew’s current installation instructions, command reference, and support tiers. Homebrew’s support listing includes macOS 27 Golden Gate for Apple Silicon; that does not guarantee every formula, third-party tool, or research project will work. Confirm the cause on the affected machine rather than assuming macOS 27 is the fault.
macOS 27 Homebrew command not found: separate support status from local path
A command not found message means the current shell cannot resolve the command name. By itself, it does not prove Homebrew is missing or that macOS 27 is unsupported. Separate three states before changing the machine:
- Homebrew is absent: neither expected prefix contains a working installation.
- Installation did not complete: the installation process stopped or left an incomplete setup.
- The executable exists, but the shell cannot locate it: the installation prefix is not on this shell’s
PATH, or the relevant shell setup has not loaded.
Homebrew’s support-tier documentation describes which macOS configurations are supported and how support is classified. Its installation guide documents the expected prefixes and the need to configure the shell environment after installation. Those are separate checks: a supported operating system does not establish that a particular formula or project dependency is available.
Start with observations, not repairs. In the terminal where the error occurs, run:
echo "$SHELL"
printf '%s\n' "$PATH"
command -v brew
Then check whether the executable is present in the expected location for the machine:
ls -l /opt/homebrew/bin/brew
ls -l /usr/local/bin/brew
A “file not found” result for one prefix is not decisive; the other path may be the correct installation. If command -v brew returns a path, record it. If neither expected file exists, inspect the installer output and the Homebrew installation guidance before attempting a clean install. Homebrew’s common issues guide is useful when installation itself reports an error.
The important distinction is between an installation problem and a command-resolution problem. Re-running an installer without checking can leave multiple installations or make a mixed-architecture setup harder to understand.
Compare the evidence before changing the setup
Use this comparison to choose the next diagnostic step. It keeps the response proportional to the evidence instead of treating every missing command as a failed installation.
| Observed result | Likely explanation | Next check |
|---|---|---|
Neither expected prefix contains bin/brew |
Homebrew may be absent or installation may have stopped | Review the installation output and follow the official installation instructions |
brew exists, but command -v brew returns nothing |
The active shell’s PATH does not include the installation’s bin directory |
Check the matching shellenv line and the startup file loaded by this shell |
brew works in one terminal but not another |
The sessions may load different startup configuration, use different accounts, or have different PATH values |
Compare $SHELL, $PATH, command -v brew, and the account in each session |
brew runs, but a research tool command does not |
The formula may not be installed, or its executable may have a different name or location | Check the formula’s installation result and official formula information |
| The prefix differs between terminal sessions or architectures | The sessions may be invoking separate Homebrew installations | Check the process architecture and brew --prefix; select the intended environment |
The Homebrew command reference documents commands such as brew --prefix, brew list, and brew info. Use them to establish what Homebrew can see before editing configuration:
brew --prefix
brew list --formula
brew info FORMULA
Replace FORMULA with the formula name being checked. A formula’s name is not necessarily the command name it installs. The Homebrew command reference and Homebrew FAQ help verify command behavior and common installation questions.
Confirm the Homebrew path on Apple Silicon
On an Apple Silicon Mac, Homebrew’s documented default prefix is /opt/homebrew; /usr/local is the documented default for Intel Macs (installation guide). Treat these as expected locations, not proof of what is installed on a particular machine.
Run the following in the terminal that cannot find brew:
arch
command -v brew
If brew is already callable in another terminal, compare the result of:
brew --prefix
brew config
The process architecture and the Homebrew prefix provide evidence about which installation the session is using. Don’t infer the active setup from the Mac’s hardware label alone. A terminal session may be running under a different architecture mode, or an older installation may still be on the PATH.
If the executable exists at /opt/homebrew/bin/brew, try the environment setup directly in the current shell:
eval "$(/opt/homebrew/bin/brew shellenv)"
command -v brew
brew --prefix
For an installation at /usr/local, use the path that actually exists:
eval "$(/usr/local/bin/brew shellenv)"
command -v brew
brew --prefix
These commands apply shellenv to the current session. They are a diagnostic test, not a permanent fix. If the command becomes available after running one of them, the likely issue is that the shell startup configuration does not load the environment. If it remains unavailable, check for a typo in the path, a missing executable, or an incomplete installation. Homebrew’s installation instructions describe the environment setup step and its default prefixes.
Don’t add both prefixes to every shell configuration “just in case.” First decide which installation the project should use, then make the startup configuration point to that installation. Mixing paths can cause confusing dependency and formula checks.
Trace startup files when a new terminal loses brew
A working command in the current session does not guarantee that a fresh session will have the same environment. Shell startup behavior depends on the shell and how it is launched. A graphical terminal, a login shell, an interactive shell, and an SSH session may not read identical configuration files.
First compare the working and failing sessions. Run the same commands in each:
echo "$SHELL"
printf '%s\n' "$PATH"
command -v brew
Record the output before editing any files. Apple’s Terminal guide to changing the default shell explains how to identify or change the shell used by Terminal. The zsh startup-file documentation describes how zsh reads its startup files. Use those references to match the fix to the shell and session type rather than pasting a configuration line into a random file.
For zsh, Homebrew’s installation instructions commonly use a line like this for the actual prefix:
eval "$(/opt/homebrew/bin/brew shellenv)"
Use /usr/local/bin/brew instead only if that is the verified location. Place the line in a startup file appropriate to the sessions that need Homebrew. Don’t assume that a file loaded by an interactive graphical terminal is also loaded by a remote or differently configured shell.
A cautious configuration check looks like this:
- Confirm the shell in the failing session with
echo "$SHELL". - Identify the relevant startup file from the shell documentation.
- Search that file for an existing
brew shellenvline. - Check whether the path in the line matches the executable found on disk.
- Open a new session and repeat
command -v brewandbrew --prefix.
Avoid adding duplicate lines before checking what is already there. Duplicate or conflicting entries can make the PATH order unpredictable. If a change breaks the session, restore the previous file from a copy rather than deleting unrelated shell configuration.
Diagnose SSH sessions and account differences separately
An SSH session is a separate diagnostic case, not just another tab in the graphical terminal. The remote account may have a different shell, a different startup configuration, or no access to the Homebrew installation used by another account. Apple’s remote login guidance covers enabling remote access; it does not mean every shell session will inherit the same environment.
Log in as the account that runs the research job, then check:
echo "$SHELL"
printf '%s\n' "$PATH"
command -v brew
If Homebrew is found, record its location and prefix:
brew --prefix
If it is not found but the executable exists, test the appropriate shellenv command in that SSH session. If that makes brew available, inspect the startup configuration for that account and session type. If it does not, verify that the remote account can access the installation path and that the installation is complete.
This matters in lab support. A researcher’s graphical terminal may work while a scheduled or remote session fails. A shared Mac can also have different user environments. Don’t edit a system-wide file to fix a single-account problem unless the lab’s support policy calls for that change. Record which account, shell, and session were tested so the next person can reproduce the finding.
Separate a missing research command from a missing brew command
Once brew runs, stop treating the issue as a Homebrew path failure. Check whether the formula is installed, whether its formula name differs from the command the project expects, and whether the executable is available in the active PATH.
Start with:
brew list --formula
brew info FORMULA
Use the formula name documented for the tool, then review the installation output for the executable or post-install instructions. If the project calls a command with a different name, confirm that name in the tool’s own documentation. Do not assume that a successful brew install means a command with the same spelling will be available.
If the formula is installed but the command is missing, inspect the installation details and check whether the executable is linked into a directory on the current PATH. Avoid using sudo as a shortcut. Homebrew’s official FAQ and common-issues guidance provide context for formula and installation problems; the local output remains the evidence for the specific machine.
For a research project, test the command from the same shell and account that will run the analysis. A command that works only in a manually adjusted interactive session may still fail in a lab script, remote login, or documented project setup. Keep the distinction clear:
- Homebrew unavailable: diagnose prefix and shell configuration.
- Homebrew available, formula absent: install or approve the required formula according to lab policy.
- Formula present, command absent: verify executable naming, linking, and
PATH. - Command available, project still fails: investigate project dependencies, versions, permissions, data access, and licensing separately.
Verify the repair with a project copy, not the original
Before reporting a fix to a research group, use a copy of the project and preserve the original working environment. This keeps the test reversible and makes it easier to separate shell repair from project changes.
- [ ] Record the macOS version, account, shell, and terminal type used for the test.
- [ ] Record the output of
command -v brewandbrew --prefix. - [ ] Confirm the formula is installed with
brew list --formulaor inspect it withbrew info FORMULA. - [ ] Open a fresh terminal or SSH session and repeat the checks. Do not rely only on the session where
shellenvwas run manually. - [ ] Run the research tool’s version or help command, if its documentation provides one.
- [ ] Run the project’s smallest approved validation task using a copy, then compare its expected output or log with the project’s documented criteria.
- [ ] Record the exact shell configuration change and the commands needed to reproduce the test.
A successful brew check proves only that the shell can call Homebrew. It does not validate the scientific tool, the project’s dependency set, or the research result. Keep those acceptance decisions separate. If the project uses sensitive or regulated data, check university policy before copying data to another machine or remote environment. Also confirm software license terms with the relevant institution or tool owner.
When no local Mac is available, a remote macOS environment can provide a separate place to check a macOS-specific command path. It does not replace approval for the software, data, or research workflow. Before using one, confirm the available macOS version, access method, and lab rules. The MESHLAUNCH remote Mac overview can help the group review the remote access option; it does not establish that a particular formula or project is compatible.
For a short-lived test, a remote Mac may be more appropriate than buying hardware solely to reproduce a shell issue. But it is not the right fit for every lab: long-running, stable workloads may be better on an already-approved local or institutional system, and work requiring physical peripherals needs access to the relevant hardware. Shared lab Macs can also create scheduling and account-separation constraints. Choose the environment based on what the project must validate, not on the assumption that renting or buying a Mac fixes a dependency problem.
If the remaining question is specifically whether a project needs a real macOS environment, MESHLAUNCH offers remote Mac access that can be evaluated against the lab’s system, access, and policy requirements. Review the available remote Mac option only after confirming that remote access is permitted and that the project’s data and licenses can be used there. If those conditions are not met, keep the test on an approved institutional machine and document the limitation.