美文网首页
使用brew cask来安装Mac应用

使用brew cask来安装Mac应用

作者: xyzmst | 来源:发表于2017-01-03 11:39 被阅读4531次

    简介

    brew cask是一个用命令行管理Mac下应用的工具,它是基于homebrew的一个增强工具。
    安装软件非常容易,一行代码就可以搞定
    比如安装atom

    brew cask install atom
    

    不知道怎么安装也可以去搜索

    brew cask search atom
    

    安装

    安装cask

    $ brew tap caskroom/cask
    

    问题

    之前用命令安装cask总是安装失败

    brew tap phinze/cask
    brew install brew-cask
    

    用下面命令安装后

     brew tap caskroom/versions
    

    安装软件时总是报错,类似这种

    No available formula with the name "brew-cask"
    Cask 'atom' definition is invalid: Bad header line: parse failed
    

    解决方法
    使用安装对应的命令

    $ cd $(brew --repo); git fetch; git reset --hard origin/master
    $ brew untap phinze/cask; brew untap caskroom/cask; brew uninstall --force brew-cask
    $ brew cleanup; brew cask cleanup; brew update
    

    参考链接

    https://caskroom.github.io/
    https://github.com/caskroom/homebrew-versions
    https://github.com/caskroom/homebrew-cask
    https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md

    相关文章

      网友评论

          本文标题:使用brew cask来安装Mac应用

          本文链接:https://www.haomeiwen.com/subject/lwggvttx.html