% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"==> Checking for `sudo` access (which may request your password)...Password:==> This script will install:/opt/homebrew/bin/brew/opt/homebrew/share/doc/homebrew/opt/homebrew/share/man/man1/brew.1/opt/homebrew/share/zsh/site-functions/_brew/opt/homebrew/etc/bash_completion.d/brew/opt/homebrew==> The following new directories will be created:/opt/homebrew/bin/opt/homebrew/etc/opt/homebrew/include/opt/homebrew/lib/opt/homebrew/sbin/opt/homebrew/share/opt/homebrew/var/opt/homebrew/opt/opt/homebrew/share/zsh/opt/homebrew/share/zsh/site-functions/opt/homebrew/var/homebrew/opt/homebrew/var/homebrew/linked/opt/homebrew/Cellar/opt/homebrew/Caskroom/opt/homebrew/Frameworks==> The Xcode Command Line Tools will be installed.HEAD is now at 6661f5b14 Merge pull request #12904 from Homebrew/dependabot/bundler/Library/Homebrew/json_schemer-0.2.19
==> Tapping homebrew/coreremote: Enumerating objects: 1146232, done.remote: Counting objects: 100% (63/63), done.remote: Compressing objects: 100% (39/39), done.remote: Total 1146232 (delta 38), reused 47 (delta 24), pack-reused 1146169Receiving objects: 100% (1146232/1146232), 456.18 MiB | 10.26 MiB/s, done.Resolving deltas: 100% (792672/792672), done.From https://github.com/Homebrew/homebrew-core * [new branch] master -> origin/masterHEAD is now at 383269fb392 checkov: update 2.0.885 bottle.Warning: /opt/homebrew/bin is not in your PATH. Instructions on how to configure your shell for Homebrew can be found in the 'Next steps' section below.==> 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/AnalyticsNo 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 two commands in your terminal to add Homebrew to your PATH: echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"- Run brew help to get started- Further documentation:https://docs.brew.sh
For first time only, run following commands
This will create ~/.zprofile file if it not exists or append eval "$(/opt/homebrew/bin/brew shellenv)" line to existing ~/.zprofile file
Once the installation is successful, run the following command:
brewdoctor
If you get Your system is ready to brew., you can move on to the next step.
Brew anonymously collect User Behaviour data. To prevent analytics from ever being sent, run:
brewanalyticsoff
Homebrew Shell Completion
Brew installs completions and functions into: /opt/homebrew/share/zsh/site-functions when a formula offers them.
Shell completions for external Homebrew commands are not automatically installed. To opt-in to using completions for external commands (if provided), they need to be linked to HOMEBREW_PREFIX by running brew completions link.
To make Homebrew’s completions available in zsh, you must insert the Homebrew-managed zsh/site-functions path into your FPATH before initialising zsh’s completion facility. Add the following to your ~/.zshrc:
Note that, this snippet must be added in the top if ~/.zshrc
non-admin
If you don't have admin/sudo access to your laptop(e.g., company issued laptop), recomend installing brew in your home directory. In this case follow these steps
cd $HOMEmkdirhomebrew&&curl-Lhttps://github.com/Homebrew/brew/tarball/master|tarxz--strip1-Chomebrew
Then add brew to front of PATH by editing your shell profile file: .zprofile and adding below line:
eval"$($HOME/homebrew/bin/brew shellenv)"
Usage
Troubleshooting:
brewconfigbrewdoctorbrewupdate# self update brewbrew--prefix# show brew homebrew--cellar# show where brew install software
Example usage:
brewinstall<formula># to install a package (or Formula in Homebrew vocabulary) brewsearchTEXT|/REGEX/# to search for formulasbrewinfo<formula># to get more information about a formulabrewinstall--verbose--debug<formula>brewlist# to see what you have installedbrewlist--versions# To see what you have installedbrewoutdated# to see if any of your formulas need to be updatedbrewupgrade<formula># to upgrade a specific formula brewuninstall<formula># to uninstall a formula
Homebrew keeps older versions of formulas installed on your system, in case you want to roll back to an older version. That is rarely necessary, so you can do some cleanup to get rid of those old versions:
brewcleanup# If you want to see what formulae Homebrew would delete without actually deleting them, you can run:brewcleanup--dry-run