中三A105论坛

注册 登录
查看: 890|回复: 0

Homebrew的使用

[复制链接]

105

主题

119

帖子

553

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
553
发表于 2019-4-23 23:54:18 | 显示全部楼层 |阅读模式

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

$ brew install wgetHomebrew installs packages to their own directory and then symlinks their files into /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 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 http://foo.com/bar-1.0.tgzCreated /usr/local/Library/Formula/bar.rbIt'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"  sha1 "f3c925f19dfe5ed386daae4f339175c108c50574"  def install    system "./configure", "--prefix=#{prefix}"    system "make", "install"  endend


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).



http://brew.sh



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回列表 返回顶部