Homebrew command details

Source: Internet
Author: User

Homebrew command details
Homebrew command details 1. Install Homebrew

Run the following command in the Shell environment:

% ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Because the website is connected to a foreign website, it may fail to be executed. The installation can be successful after multiple attempts.

Verify installation:

% brew -vHomebrew 0.9.5 (git revision fb9a; last commit 2016-01-10)

The installation is successful.

Homebrew instructions:

1) Homebrew installs the tool in a separate directory and establishes a symbolic connection to/usr/local.

2) Homebrew can create custom software installation packages

3) There are three steps to update the local software package:

Step 1: Update Homebrew itself

# brew update

Step 2: Find out the expired Software Package (that is, the software package with an updated version)

# brew outdated

Step 3: upgrade all expired software packages

# brew upgrade

Or upgrade the specified expired software package.

# brew upgrade $FORMULA

4) the installation process of the software package should be suspended/restored during the upgrade process.

Pause the installation process

# brew pin $FORMULA

Restore Installation Process

# brew unpin $FORMULA

5) uninstall the old software package

By default, Homebrew does not automatically uninstall old software packages. Therefore, many old software packages will be installed on the computer over time, if you want to remove multiple old versions of the same software package, you only need:

First, clear all old versions of the specified software package.

# brew cleanup $FORMULA

Method 2: clear all old versions of all software packages

# brew cleanup

Third: check which software packages are to be cleared

# brew cleanup -n

6) If Homebrew does not Uninstall all versions of the software package, Homebrew will continue to try to install the latest version of the software package. To thoroughly Uninstall a software package, run the following command:

# brew uninstall formula_name --force
Ii. Install Git

Mac OS X Yosemite version 10.10.5 comes with the Git tool, but the built-in version is 2.5.4. For example:

% git versiongit version 2.5.4 (Apple Git-61)% which git/usr/bin/git

Run the following command:

% brew install git==> Downloading https://homebrew.bintray.com/bottles/git-2.7.0.yosemite.bottle.t######################################################################## 100.0%==> Pouring git-2.7.0.yosemite.bottle.tar.gz==> CaveatsThe OS X keychain credential helper has been installed to:  /usr/local/bin/git-credential-osxkeychain......==> Summary   /usr/local/Cellar/git/2.7.0: 1,407 files, 235.9M

The latest version 2.7.0 of Git is installed.

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.