Homebrew安装简介

原文地址:https://brew.sh

  • 安装命令

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

    Paste that at a Terminal prompt.

    The script explains what it will do and then pauses before it does it. There are more installation options here (needed on 10.5).


  • What Does Homebrew Do?


    Homebrew installs the stuff you need that Apple didn’t.

    $ brew install wget
  • Homebrew installs packages to their own directory and then symlinks their files into /usr/local.

    $ cd /usr/local
    $ find Cellar
    Cellar/wget/1.16.1
    Cellar/wget/1.16.1/bin/wget
    Cellar/wget/1.16.1/share/man/man1/wget.1
    
    $ ls -l bin
    bin/wget -> ../Cellar/wget/1.16.1/bin/wget
  • Homebrew won’t install files outside its prefix, and you can place a Homebrew installation wherever you like.

  • Trivially create your own Homebrew packages.

    $ brew create https://foo.com/bar-1.0.tgz
    Created /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bar.rb
  • It's all git and ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.

    $ brew edit wget # opens in $EDITOR!
  • Homebrew formulae are simple Ruby scripts:

    class Wget < Formula
      homepage "https://www.gnu.org/software/wget/"
      url "https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
      sha256 "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
    
      def install
        system "./configure", "--prefix=#{prefix}"
        system "make", "install"
      end
    end
  • Homebrew complements macOS. Install your gems with gem, and their dependencies with brew.









  • Further Documentation

  • Community Discussion

  • Homebrew Blog

  • Analytics Data


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值