Manage your Mac development package with homebrew

Source: Internet
Author: User

Many people may not understand Homebrew, in fact, it is equivalent to the development of software industry AppStore.

For example, if I want to install the latest version of Python, the traditional approach is
1. Download the latest version of Python to the official website
2. Extremely cumbersome and cautious removal of your own Python version
3. Install the new version
4. Setting Environment variables

With Homebrew, the only thing you need to do is:
Brew Uninstall Python
Brew Install Python

The whole process is just waiting, do not need Baidu Python official website, do not need to find the uninstall installation configuration environment variable tutorial ...

Installing Homebrew

More benefits will be discovered in your later use.
Below we carry out the installation of Homebrew.

Open terminal and enter the following command:

Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

Attention:

Due to network reasons, may not be successful, please try a few more times, until the successful installation.

In the middle there will be a press return to the continue or any other key to abort, please enter in time, and input the password, do not wait silly ...

Don't add sudo, it doesn't matter, you will be prompted to do not run as root

If a package is causing the installation to fail, you only need to follow the instructions to

When you see the following content

? Indicates that the installation has completed successfully.

View Brew's Help

Brew–help

Installing the Software

Brew Install Git

Uninstalling software

Brew Uninstall Git

Search Software

Brew Search Git

Show list of installed software

Brew List

Update the software, update all the formula directories, and mark the software that has been installed and updated with *.

Brew Update

Update a specific software

Brew Upgrade Git

View software Information

Brew [INFO | home] [FORMULA ...]

Remove Programs, like upgrade, single software removal and all programs old version removed.

Brew cleanup git
Brew cleanup

View those installed programs that need to be updated

Brew outdated

Other Homebrew Instructions:

Brew list-Lists installed software

Brew update-Update Homebrew

Brew Home *-opens in a browser

Brew Info *-Displays software content information

Brew Deps * * Show package dependencies

Brew Server *-Starts a Web server that can be accessed by a browser http://localhost:4567/to manage the package with a Web page

Brew-h brew-Help

Homebrew itself is a git repository. When using homebrew to install the package, the package will be downloaded automatically first, and then unzip the installation, but sometimes the download will be stuck, or very slow, this time you can use other tools to download the required package, note that the version must correspond to the homebrew to place the package source code path is/ library/caches/homebrew/, as long as you will need to download the correct version of the package, placed in this directory, then use the Brew install XXX, brew can be installed directly, sometimes brew install XXX card in the download interface , it works.

Making a formula is easy. Just and then brew create URL brew install $FORMULA (perhaps with --debug --verbose ). Basically, a formula is a Ruby file. You can place it anywhere on your want (local or remote) and install it by pointing to the file or URL.

formula文件位置:/usr/local/Library/Formula/foo.rb  存放安装工具的rb文件

Packages is installed according to their formulae, which live in $(brew --repository)/Library/Formula . Check some out. You can view any formula at anytime; e.g. brew edit wget

In addition, the brew installation process requires the use of Apple's Xcode compiler, you can go to Apple's official website for free download installation (need to register a free developer, then download), after installation to the properties (Xcode- Perference--downloads--components--command line Tools) Click to download it.

Homebrew Tool Address: https://github.com/Homebrew/homebrew

Manage your Mac development package with 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.