How to install Homebrew on macOS

不言
Release: 2019-03-30 14:48:19
Original
3272 people have browsed it

Homebrew is the most popular package management tool for macOS systems. Using the brew command line utility, you can easily add new packages on your Mac, but you must install it first. This article will introduce how to install Homebrew on your system using simple commands.

How to install Homebrew on macOS

#How to install Homebrew?

Launch the Terminal (/applications/utilities/terminal) application on your system and run the following commands on it.

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

The installation process will prompt for a password. Just enter the password you need to complete the Homebrew installation. This process takes some time. After the installation is complete, execute the following command to check the version.

$ brew --version
Homebrew 1.5.4
Homebrew/homebrew-core (git revision 1bf5; last commit 2018-02-12)
Copy after login

You can also run the following command to make sure everything is configured correctly.

$ brew doctor
Copy after login

How to upgrade Homebrew?

To upgrade homebrew, execute the following command in the terminal prompt.

$ cd "$(brew --repo)" git fetch && git reset --hard origin/master && brew update
Copy after login

How to uninstall Homebrew?

To uninstall homebrew, execute the following command at the terminal prompt.

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Copy after login

You can also download the uninstall script and run it as shown below to see more uninstall options.

$ ./uninstall --help
Copy after login

This article has ended here. For more other exciting content, you can pay attention to the Linux Video Tutorial column on the PHP Chinese website!

The above is the detailed content of How to install Homebrew on macOS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template