精华内容
下载资源
问答
  • Homebrew

    千次阅读 2015-04-04 14:56:09
    Homebrew

    Homebrew官方网站内容

    http://brew.sh/

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

    • 2.
      Homebrew 会将套件安装到独立目录/usr/local/Cellar,并将文件软链接至 /usr/local 。

    $ brew install wget

    $ 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

    • 3.
      Homebrew 的所有文件均会被安装到预定义目录下,所以您无需担心 Homebrew 的安装位置。

    Mac安装Homebrew

    http://www.cnblogs.com/liulipeng/p/3938518.html

    • 1.安装命令如下:
      curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local –strip 1

    • 2.当brew安装成功后,就可以随意安装自己想要的软件了,例如wget,命令如下:
      sudo brew install wget

    • 3.卸载的话,命令如下:
      sudo brew uninstall wget

    • 4.查看安装软件的话,命令如下:
      sudo brew search /apache*/

    注意/apache*/是使用的正则表达式,用/分割。

    Homebrew更新本地已安装的package

    Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)
    http://blog.csdn.net/delphiwcdj/article/details/19679891

    • 第一步:先更新brew:
      brew update

    • 第二步:更新所有package:
      brew upgarde

    // 很多blog提供的Homebrew的安装命令失效,出现更新了;
    rubye"(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

    Whoops, the Homebrew installer has moved! Please instead run:

    ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

    Also, please ask wherever you got this link from to update it to the above.
    Thanks!

    rubye"(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

    It appears Homebrew is already installed. If your intent is to reinstall you
    should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

    // 已经安装了Homebrew,可以卸载;这是卸载命令;
    // 看到Homebrew会将套件安装到独立目录/usr/local/Cellar;
    $ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

    // 获取Homebrew命令
    rubye"(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

    // 安装wget出错,因为被墙了啊,可以借助vpn安装;
    $ brew install wget
    ==> Installing wget dependency: openssl
    ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.mavericks.

    curl: (6) Could not resolve host: homebrew.bintray.com
    Error: Failed to download resource “openssl”
    Download failed: https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.mavericks.bottle.tar.gz
    Warning: Bottle installation failed: building from source.
    Error: /usr/local/opt/makedepend not present or broken
    Please reinstall makedepend. Sorry :(

    展开全文
  • homebrew

    2020-10-23 14:56:07
    # 替换 Homebrew git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git # 替换 Homebrew Core git -C "$(brew --repo homebrew/core)" remote set-url origin ...

    换源

    
    # 替换 Homebrew
    git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    
    # 替换 Homebrew Core
    git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
    
    # 替换 Homebrew Cask
    git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
    
    # 替换 Homebrew-bottles
    # 对于 bash 用户:
    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
    source ~/.bash_profile
    # 对于 zsh 用户:
    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
    source ~/.zshrc
    

    常用命令

    brew list                    #列出所有安装的包
    brew search + 包名     #在源中搜索期望的包
    brew info + 包名         #在源中搜索期望的包,并且打印更详细的信息
    brew install + 包名      #安装对应的包
    brew uninstall + 包名  #卸载已经安装的包
    brew updata               #升级brew
    
    展开全文
  • HomeBrew

    2016-07-15 13:52:51
    了解HomeBrew

    HomeBrew:

    什么是homebrew?

    Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X.

    Homebrew是一个包管理器,用于在Mac上安装一些OS X没有的工具,比如wget,git, svm 

    Homebrew将这些工具统统安装到了/usr/local/Cellar目录中,并在/usr/local/bin中创建符号链接


    Homebrew是基于Ruby的,所以安装过程很简单

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

    使用brew doctor命令检测下是否有什么冲突的地方(比如没有把MacPorts卸载了)

    which brew命令,查看brew安装在哪个路径下

    卸载HomeBrew也很容易

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


    brew能够控制的就是自己管理安装的那些软件了,这些软件都在/usr/local/Cellar目录下,如果不是brew方式来安装的软件,brew以后就管不了了。

    Homebrew安装成功后,会自动创建目录/usr/local/Cellar来存放Homebrew安装的程序。

    下面我们来介绍一些简单的brew 命令及其作用

    brew install git 就可以安装git软件了

    brew uninstall git 就可以卸载git软件了

    brew search git 就可以搜索程序git位置了

    brew list 显示已安装的包

    brew home ruby 用浏览器打开ruby相关的页面

    brew info ruby 显示ruby包的信息

    brew deps ruby 显示ruby包依赖

    brew server 启动web服务器,可以通过浏览器访问http://localhost:45678---->这个不知道怎么测试,没看懂

    brew -h 查看brew的帮助

    brew updage 更新软件,把所有的Formula目录更新,并且会对本机已经安装并有更新的软件用*标明

    brew upgrade git 更新某具体软件

    brew cleanuup git 删除git程序

    brew cleanup 删除所有程序

    brew outdated 查看哪些已安装的程序需要更新


    展开全文

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 28,027
精华内容 11,210
关键字:

homebrew