Package Manager similar to Apt-get under MAC system--Homebrew

Source: Internet
Author: User

For a habit of using the Ubuntu terminal on the Apt-get to install the tool software, I also hope to find similar tools on the Mac, a very convenient command to install the required software, instead of manually to find the download compile, or toss the installation of some of the dependencies required. It's a surprise to find that there are similar tool package managers on Mac-Homebrew.

Homebrew is not a package can be installed, it can only install some system default software packages, such as: wget, Nginx, MySQL and so on. However, with the new tap operation in version homebrew0.9, software packages for installing third-party data sources are supported, and the packages that support installation will be more and richer later.

Homebrew Installation

Installing the Homebrew is simple, just enter a line of Ruby script on the terminal (so build the Ruby runtime environment, Ruby is preinstalled on your Mac):

1 ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Homebrew use

Homebrew and Ubuntu in the same apt-get, update is the list of updates package, install installs the package, uninstall is to uninstall the package, usage is similar, familiar with Apt-get use is very easy to get started.

Here are some common operations for Homebrew (the package is replaced with the name of the software you want to install, such as Nginx, MySQL, you can install the software you want to install properly):

Display Help information

1 brew -h

Version of Homebrew

1 brew -v

List homebrew suggestions or warning messages

1 brew doctor

List installed Packages

1 brew list

Update Homebrew Package

1 brew update(up)

Open the Package home page with a browser (the package is empty to open the Homebrew home page)

1 brew home package

displaying package content information

1 brew info package

Show Package dependencies

1 brew deps package

Find out if you want to install a package (Fuzzy Lookup support)

1 brew search package

To view information about a package

1 brew info package

Installation options for packages

1 brew options package

Install packages

1 brew installpackage

If you want to see the commands executed during the installation or compile information, you can add a "-V" parameter after "install":

1 brew install-vpackage

Uninstalling packages

1 brew uninstall(remove) package

Install third-party tool packages with Homebrew, such as installing the official default PHP with Homebrew

1 brew tap josegonzalez/php

If a new version of the package is available, you can update the outdated packages with upgrade (the default package parameter is all updates):

1 brew upgrade package

To clean up older versions of the data that were previously installed:

12 brew cleanup --force -srm-rf $(brew --cache)

More detailed usage instructions can be viewed in the terminal input "man brew".

Ps:mac Software management tools like Homebrew also have MacPorts, Fink.

Some configuration directories for Homebrew:

    • /library/caches/homebrew: Where to install the downloaded files

Package Manager similar to Apt-get under MAC system--Homebrew

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.