How does Mac install homebrew?

Source: Internet
Author: User
Tags install homebrew tar xz

After searching for homebrew on the GitHub website and finding the corresponding homebrew, check out the installation documentation for the following links:

Https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Installation.md

The installation requires OS X 10.6 or more systems, and the Xcode command line tool is installed.

The installation path cannot have spaces. The official recommendation is to install under the/usr/local path.

Open the terminal of your Mac. Enter the path, and then execute the commands in the installation documentation.

Cd/usr/local
mkdir Homebrew
Curl-l https://github.com/homebrew/homebrew/tarball/master | tar xz--strip 1-c Homebrew

The above installation simply extracts homebrew to local, and you need to configure environment variables to use the Brew command, otherwise the terminal will prompt command not Found.

Configure the environment variables for your Mac for the first time, and turn around the internet to find the right way.

Open the terminal and create a new. bash_profile file in the ~/directory (if you already have this file on your computer, skip this step)

Touch ~/.bash_profile

Open the. Bash_profile

Open ~/.bash_profile

Configure path in the edit window that pops up

Export Path=/usr/local/homebrew/bin: $PATH

Then go back to the terminal input to make the file effective.

SOURCE ~/.bash_profile

At this point, the environment variable configuration is complete.

How does Mac install 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.