简洁优雅的命令行工具 homebrew-cask 使用homebrew-cask安装软件,只需要一行命令 brew cask install sublime-text skitch dropbox brew cask uninstall qq 卸载 QQ 特别注意 homebrew-cask是将应用程序放置在/opt/homebrew-cask/Caskroom/下,会在你的家目录中的「应用程序 homebrew-cask vs Mac App Store homebrew-cask 和 Mac App Store 相比,目前还有很多优势: 安装软件体验非常一致简洁优雅 对常用软件支持更全面, 虽然我个人很喜欢 homebrew-cask,但还是希望 Apple 尽快完善 Mac App Store ,等到有一天我可以不再使用 homebrew-cask。这样说是不是显得我很薄情? :) 关于软件更新 homebrew-cask团队一直还在探讨软件更新策略,以及homebrew-cask与homebrew的关系。
Homebrew主要有四个部分组成: brew、homebrew-core 、homebrew-bottles、homebrew-cask。 brew Homebrew 源代码仓库 homebrew-core Homebrew 核心软件仓库 homebrew-bottles Homebrew 预编译二进制软件包 homebrew-cask mirrors.ustc.edu.cn/homebrew-core.git 3.替换homebrew-cask.git: cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask github.com/Homebrew/homebrew-core.git 3.重置 homebrew-cask.git 为官方源: cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask " && git remote set-url origin https://github.com/Homebrew/homebrew-cask 4.zsh 注释掉 HOMEBREW_BOTTLE_DOMAIN
Homebrew/homebrew-core (no Git repository) fatal: unsafe repository ('/opt/homebrew/Library/Taps/homebrew/homebrew-cask this directory, call: git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask Homebrew/homebrew-cask (no Git repository) 解决办法,执行下面命令 git config --global --add safe.directory / homebrew/homebrew-core git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew install 慢的解决方法 brew install 会先去执行 brew update 而 brew update,会依次更新 : brew / homebrew-core / homebrew-cask origin ~/Documents/repository/homebrew-core.git cd /usr/local/Homebrew/Library/Taps/homebrew/ mkdir homebrew-cask cd homebrew-cask git remote set-url origin ~/Documents/repository/homebrew-cask.git ?
Homebrew 主要有四个部分组成: brew、homebrew-core 、homebrew-bottles、homebrew-cask。 名称 说明 brew Homebrew 源代码仓库 homebrew-core Homebrew 核心软件仓库 homebrew-bottles Homebrew 预编译二进制软件包 homebrew-cask homebrew-cask.git 为官方源 $ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask
"$(brew --repo)" remote -v # 查看homebrew-core镜像源 git -C "$(brew --repo homebrew/core)" remote -v # 查看homebrew-cask brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git # 修改homebrew-cask brew-cask-completion 安装完成后输入brew cask help测试,如果出现以下内容并卡住 Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask homebrew git clone https://mirrors.ustc.edu.cn/homebrew-cask.git 再输入brew cask help测试,应该就会显示帮助信息,接着按照上面的方法修改homebrew-cask
homebrew-cask is a shallow clone. Library/Taps/homebrew/homebrew-core fetch --unshallow git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask Library/Taps/homebrew/homebrew-core fetch --unshallow git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask 一般使用中科大的: ## 更新 homebrew-cask cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask # 更换源 git remote
好消息是一个叫做homebrew-cask的工具扩充了homebrew。 安装软件 brew cask install google-chrome 卸载软件 brew cask uninstall google-chrome 参考资料 更多关于Homebrew以及Homebrew-cask 1、Homebrew官网 2、Homebrew-cask官网
homebrew/homebrew-core" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git #更新Homebrew-cask (最重要的一步,很多更新完国内源依然卡就是没更新这个) cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask git remote set-url
mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git #url = git://mirrors.ustc.edu.cn/homebrew-core.git homebrew-cask homebrew-cask就是扩展homebrew仓库以支持UI应用的插件,其实他是一个第三个仓库,在homebrew里叫一个Tap。 他其实是应用的索引,跟homebrew一样也是一个git仓库。 保存的目录是$(brew --repo)/Library/Taps/caskroom/homebrew-cask,它对应的github地址是:https://github.com/caskroom/homebrew-cask.git
1.执行 brew install xxx 命令报错fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask Library/Taps/homebrew/homebrew-caskfatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
/Library/Taps/homebrew/homebrew-core 同步cask sudo mkdir -p /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
git -C "$(brew --repo)" remote -v查看homebrew-core镜像源git -C "$(brew --repo homebrew/core)" remote -v查看homebrew-cask (brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git# 修改homebrew-cask (brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git# 恢复homebrew-cask
主要有四个部分组成: brew、homebrew-core 、homebrew-cask、homebrew-bottles。 名称 说明 brew Homebrew 源代码仓库 homebrew-core Homebrew 核心源 homebrew-cask 提供 macOS 应用和大型二进制文件的安装 homebrew-bottles
主要有四个部分组成 名称 说明 brew Homebrew 源代码仓库 homebrew-core Homebrew 核心软件仓库 homebrew-bottles Homebrew 预编译二进制软件包 homebrew-cask homebrew-cask.git 为官方源 $ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask
3.4.9-19-g607c7b6 Homebrew/homebrew-core (git revision e937ec006ef; last commit 2022-04-29) Homebrew/homebrew-cask
解决办法: cd /usr/local/Homebrew/Library/Taps/homebrew rm -rf homebrew-core rm -rf homebrew-cask brew upgrade
Taps/homebrew/homebrew- git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew 2.1.1-38-ge68fc53 Homebrew/homebrew-core (git revision 4465d; last commit 2019-04-22) Homebrew/homebrew-cask
master/install)" 举个栗子,如果你要安装sublimeText,你可以这样: brew install sublime-text 再优雅点,你可以安装Homebrew的命令行工具homebrew-cask brew tap phinze/homebrew-cask && brew install brew-cask # 然后你可以这样愉快地安装一堆软件 brew cask install sublime-text