Homebrew OS X 不可或缺的套件管理器

來源:互聯網
上載者:User

標籤:http   使用   os   檔案   io   for   

  • 提示缺少套件啦?別擔心,Homebrew 隨時守候。

    $ brew install wget
  • Homebrew 會將套件安裝到獨立目錄,並將檔案軟連結至/usr/local 。

    $ cd /usr/local$ find CellarCellar/wget/1.15Cellar/wget/1.15/bin/wgetCellar/wget/1.15/share/man/man1/wget.1$ ls -l binbin/wget -> ../Cellar/wget/1.15/bin/wget
  • Homebrew 的所有檔案均會被安裝到預定義目錄下,所以您無需擔心 Homebrew 的安裝位置。

  • 輕鬆建立您的 Homebrew 程式。

    $ brew create http://foo.com/bar-1.0.tgzCreated /usr/local/Library/Formula/bar.rb
  • 以 git、 ruby 為其筋骨,所以藉助您的相關知識,自由修改,並且可以簡單撤回您的調改或者合并上遊更新。

    $ brew edit wget # opens in $EDITOR!
  • Homebrew 的程式都是簡單的 Ruby 指令碼:

    require "formula"class Wget < Formula  homepage "http://www.gnu.org/software/wget/"  url "http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"  sha1 "f3c925f19dfe5ed386daae4f339175c108c50574"  def install    system "./configure", "--prefix=#{prefix}"    system "make", "install"  endend
  • Homebrew 使 OS X 更完美。使用 gem 來安裝 gems、用brew 來搞定那些依賴包。

  • 擷取 Homebrew
    ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

    開啟終端視窗, 粘貼以上指令碼。

    指令碼會解釋它的作用,然後在您的確認下執行安裝。進階安裝選項請看 這裡(需要10.5)。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.