One, install Brew
1, install Brew
CURL-LSSF Http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz-c/usr/local--strip 1
2, execution after installation is complete
Brew
Tip: Please run brew update!
3, follow the prompts to update, execute
Brew Update
Error:error:/usr/local must be writable!
4, assign to/usr/local directory permissions, execute sudo chown-r $ (whoami)/usr/local, i.e.
sudo chown-r fxp/usr/local
Where FXP is the system's current user name.
5, execute again
Brew Update
Tips:
Remote:total 0 (Delta 0), reused 0 (Delta 0), pack-reused 0
HEAD is now in c3f959d Merge pull request #1542 from Woodruffw/deprecate-utils-json
To restore the stashed changes to/usr/local run:
' Cd/usr/local && git stash pop '
==> Homebrew has enabled anonymous aggregate user behaviour Analytics
Read the analytics documentation (and how to opt-out) here:
Https://git.io/brew-analytics
==> Tapping Homebrew/core
Cloning into '/usr/local/library/taps/homebrew/homebrew-core ' ...
Remote:counting objects:3757, done.
Remote:compressing objects:100% (3647/3647), done.
Remote:total 3757 (Delta), reused 305 (Delta 1), pack-reused 0
Receiving objects:100% (3757/3757), 3.00 MiB | 30.00 kib/s, done.
Resolving deltas:100% (13/13), done.
Checking connectivity ... done.
Tapped 3636 Formulae (3,784 files, 9.3M)
Already up-to-date.
Error: Could not link:
/usr/local/share/doc/homebrew
Please delete these paths and run ' Brew Update '.
==> Migrating homebrew_repository (Please wait) ...
Error: Could not link:
/usr/local/share/doc/homebrew
Please delete these paths and run ' Brew Update '.
==> migrated homebrew_repository to/usr/local/homebrew!
Homebrew no longer needs to the ownership of/usr/local. If you wish can
Return/usr/local to it default ownership with:
sudo chown root:wheel/usr/local
6, follow the prompts to delete/usr/local/share/doc/homebrew, execute
Rm-r-f/usr/local/share/doc/homebrew
7, execute again
Brew Update
Install the update successfully!
Second, using brew
Below the command line to perform brew, use the following instructions:
Example usage:
Brew Search [text|/regex/]
Brew (info|home|options) [FORMULA ...]
Brew Install FORMULA ...
Brew Update
Brew upgrade [FORMULA ...]
Brew Uninstall FORMULA ...
Brew list [FORMULA ...]
Troubleshooting:
Brew Config
Brew Doctor
Brew INSTALL-VD FORMULA
Developers:
Brew Create [URL [--no-fetch]]
Brew edit [FORMULA ...]
Https://github.com/Homebrew/brew/blob/master/docs/Formula-Cookbook.md
Further help:
Mans Brew
Brew Help [COMMAND]
Brew Home
Common commands are installation and uninstallation, to install and uninstall AutoJump as an example:
Installation: sudo brew install autojump
Uninstall: sudo brew uninstall wget
To view the installation software, the command is as follows:
sudo brew search/apache*/
Note that/apache*/is used for regular expressions, used/split.
MAC Installation Brew