0

I am using macOS 15.5 and I configured the terminal via the settings.

I changed the color, size, etc., and saved it.

After installing Homebrew, I wanted to include the path in the configuration file.

However, there is neither a .zshrc nor a .zprofile file. Where does OS X save the configuration and can I edit it directly so that I can add a path there?

If I generate a new ~/.zprofile and enter the command eval "$(/opt/homebrew/bin/brew shellenv)", the error message that brew was not found appears after starting the terminal (but it is in this location).

Giacomo1968
  • 58,727
sonceklab
  • 1
  • 1

1 Answers1

0

Here I assume installing in macOS 15.5 would be similar to macOS 14.5. I don't have macOS 15.5 and do have macOS 14.5. When Homebrew finishing installing, I don't have any files in the /opt directory. Below are my results from installing.


According to https://brew.sh, the command to install Homebrew is as given below.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

When installing Homebrew on macOS Sonoma 14.5, I get the following messages at the end of installation.

==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations

==> Next steps:

  • Run these commands in your terminal to add Homebrew to your PATH: echo >> /Users/davidanderson/.zprofile echo 'eval "$(/usr/local/bin/brew shellenv)"' >> /Users/davidanderson/.zprofile eval "$(/usr/local/bin/brew shellenv)"
  • Run brew help to get started
  • Further documentation: https://docs.brew.sh

I was able to run the following commands without any error messages.

echo >> /Users/davidanderson/.zprofile
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> /Users/davidanderson/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

BTW, the command echo "$(/usr/local/bin/brew shellenv)" produces the following output.

export HOMEBREW_PREFIX="/usr/local";
export HOMEBREW_CELLAR="/usr/local/Cellar";
export HOMEBREW_REPOSITORY="/usr/local/Homebrew";
fpath[1,0]="/usr/local/share/zsh/site-functions";
PATH="/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin"; export PATH;
[ -z "${MANPATH-}" ] || export MANPATH=":${MANPATH#:}";
export INFOPATH="/usr/local/share/info:${INFOPATH:-}";