The use of Mac under package management platform homebrew

Source: Internet
Author: User
Tags install node brew cask

First, installation

Reference: http://www.cnblogs.com/EasonJim/p/6287098.html

Second, use

Suppose I want to install node with the following command:

Install software Brew Install node uninstall Software Brew Uninstall node search software Brew search node update software Brew upgrade node reinstall Brew Reinstall node Remove software Brew Cleanup node see which software needs to be updated brew outdated update all software brew upgrade Show list of installed software brew list
Update your own brew update
Third, the location of the program storage
/usr/local/Cellar so brew installation program, will be [program name / version number] In this directory /usr/local/bin for the installation of the program's startup link (equivalent to a shortcut), The program above links to the /usr/local/Homebrew system itself folder

Official Way of realization:

CD /usr/localfind  cellarcellar/wget/1.16.1Cellar/wget/1.16.1/bin/ wgetcellar/wget/1.16.1/share/man/man1/wget.1$ ls-l binbin/wget. /cellar/wget/1.16.1/bin/wget
Iv. Create your own brew package

If the package you need is not found in homebrew, what to do, after all, homebrew is a freshman project, it is impossible to meet the needs of all. Of course, we can compile the installation on our own, but it is not convenient to manage the packages that are manually installed outside of homebrew.

As I said earlier, homebrew's package configuration using Ruby is very handy, so let's talk about package customization (assuming the package name is bar, from the Foo site).

First find the source of the software to be installed

Http://foo.com/bar-1.0.tgz

Build your own formula.

Brew Create http://foo.com/bar-1.0.tgz

Edit formula, when the previous step is successful, homebrew automatically opens the new formula for editing, or you can use the following command to open formula for editing.

Brew Edit Bar

Homebrew automatically established formula already contains the basic configure and make install command, for most of the software, no need to modify, quit editing.

Enter the following command to install your custom package

Brew Install Bar

Transferred from: http://linfan.info/blog/2012/02/25/homebrew-installation-and-usage/

Official Tutorial: http://brew.sh/index_zh-cn.html

Five, Brew's extended version brew cask

Homebrew-cask can help you to install a variety of software with a simple button

Installation Method Reference Official Tutorial: https://caskroom.github.io/, enter:

Brew Tap Caskroom/cask

After installation, test is OK, enter:

Brew Cask Info Google-chrome

This information appears to indicate that the installation is normal.

Common use methods:

Brew Cask Install Google-chrome installation google-chrome software Brew Cask search query all the software that can be installed brew cask search google-chrome find all and drop related The software Brew Cask Info google-chrome View google-chrome Application information Brew Cash uninstall Google-chrome uninstall Google-chrome

Create Brew Cask Package

Brew Cask Create My-cask

Reference: https://caskroom.github.io/

The use of Mac under package management platform 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.