Many Linux users like the apt package management system (Debian/UBUNTU) and the yum package management system (RedHat/Fedora. Windows users have a variety of convenient software management tools, such as 360 software management, QQ Software management, and thunder software management. Macports And Fink package management systems (which will be introduced later) are available in Mac OS X systems, including Apple's official Mac app store. This article introduces homebrew, a relatively new and convenient package management system.
Homebrew frees you from numerous. Configure, make and other commands.
The following describes how to use homebrew:
1. Preparations before installation:
Install xcode, go to Apple official website download xcode generally has more than 1 GB size,: http://developer.apple.com/technologies/xcode.html
2. Install homebrew
Run the following command in the command line status of the terminal:
Sudo ruby-E "$ (curl-fssl https://gist.github.com/raw/323731/install_homebrew.rb )"
3. Install the program through homebrew
HomebrewAfter the installation is successful, the directory is automatically created
/Usr/local/cellar to store the programs installed by homebrew. You can use the brew command in the command line status.
Use brew install to install the software,
You can use brew search to search for programs, such as brew search Vim. You can search for programs with names including vim.
4. Update the package
Through brew update, you can update the package information to the latest version. However, the package update is implemented by using the GIT command. Therefore, you must first install git using the brew install git command.
5. Other commands
Brew List displays installed packages
Brew home [] Open the related package page in a browser
Brew info [] display package information
Brew deps [] display package Dependencies
Brew server starts the Web server and can access http: // localhost: 4567/in a browser to manage packages on the same webpage.
Brew-H brew help
The Brew command
Useman brew
To view the manpage.
Command |
Description |
brew --cache |
Print path to Homebrew's download cache (usually~/Library/Caches/Homebrew ) |
brew --cellar |
Print path to Homebrew's cellar (usually/usr/local/Cellar ) |
brew --config |
Print System Configuration info |
brew --env |
Print homebrew's Environment |
brew --prefix |
Print path to Homebrew's prefix (usually/usr/local ) |
brew --prefix [formula] |
Print whereformula Is Installed |
brew audit |
Audit All formulae for common code and style issues |
brew cleanup [formula] |
Remove older versions from the cellar for all (or specific) Formulae1 |
brew create [url] |
Generate formula for downloadable fileurl , Then open it in$BREW_EDITOR Or$EDITOR 2 |
brew create [tarball-url] --cache |
Generate formula (including MD5), then download the tarball |
brew create --fink [formula] |
Open Fink's search page in your browser, so you can see how they doformula |
brew create --macports [formula] |
Open macports 'search page in your browser, so you can see how they doformula |
brew doctor |
Check your homebrew installation for common issues |
brew edit |
Open all of homebrew for editing in textmate |
brew edit [formula] |
Open [formula] In$HOMEBREW_EDITOR Or$EDITOR |
brew fetch --force -v --HEAD [formula] |
Download source packageformula ; For tarbils, also prints MD5 andsha1Checksums |
brew home |
Open homebrew's homepage in your browser |
brew home [formula] |
Opensformula 'S homepage in your browser |
brew info |
Print Summary of installed packages |
brew info [formula] |
Print infoformula (Regardless of whetherformula Is Installed) |
brew info --github [formula] |
Open GitHub's history pageformula In your browser |
brew install [formula] |
Installformula |
brew install --HEAD [formula] |
InstallHEAD Versionformula (If its formula definesHEAD ) |
brew install --force --HEAD [formula] |
Install a newerHEAD Versionformula (If its formula definesHEAD ) |
brew link [formula] |
Symlink all installed filesformula Into the Homebrew prefix3 |
brew list [formula] |
List all installed filesformula (Or all installed formulae with no arguments) |
brew options [formula] |
Display install options specific to formula. |
brew outdated |
List formulae that have an updated version available (brew install formula Will install the newer version) |
brew prune |
Remove dead symlinks from homebrew's prefix4 |
brew remove [formula] |
Uninstallformula |
brew search |
List all available Formula |
brew search [formula] |
Searchformula In all available Formulae |
brew search /[formula]/ |
Search/formula/ (As RegEx) in all available Formulae |
brew unlink [formula] |
Unsymlinkformula From homebrew's prefix |
brew update |
Update formulae and homebrew itself |
brew upgrade |
Install newer versions of outdated packages |
You can update outdated packages with any of the following:
brew upgrade
brew install `brew outdated`
brew outdated | xargs brew install
1 to delete a specific version, just go to the folder in the cellar andrm -rf
It; alternatively, drag it to the trash in finder.
2 homebrew tries to guess the formula name and version. If it fails, you'll have to make your own template. I suggest copyingwget
'S.
3 symlinking is automatically installed med when installing formulae. It's useful fordiy installation, or swapping out versions of a package you have multiple installof.
4 This is generally not needed. However, it can be useful if you are doingdiy installations.
[Switch] homebrew-OSX simple package management system