【笔记16】MacBook安装Homebrew(macOS Catalina version10.15.7)
背景: 电脑里没有装homebrew,所以brew install就不能使用,之前尝试过安装但出现443错误,就一直没有继续,但最终效率还是打败了懒惰。
url: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out
这是一直出现的错误,实际上是由于到raw.githubusercontent.com
的连接不稳定所以报错,翻了很多教程最后是跟着 https://zhuanlan.zhihu.com/p/90508170 配置成功。
安装homebrew
大体是一样的,稍微记录一些不一样的小细节。
首先是安装,教程换了个安装源,飞速下载,就是安装Xcode CLT(Command Line Tools)的时候有些费时。/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"
最后出现了喜人的安装成功。
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
没有安装失败,一开始还觉得怎么那么顺利,但是通过brew cask install
时报了Error: Unknown command: cask
的错误,转而使用brew install
,于是遇上了自动安装homebrew-cask的问题。
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
解决方案还是如教程一样,先control+c中止再直接下载
cd "$(brew --repo)/Library/Taps/"
cd homebrew
git clone https://mirrors.ustc.edu.cn/homebrew-cask.git
最后还是通过brew install安装工具包brew install android-platform-tools
。
修改profile
这里值得一提的是,Catalina开始在 Mac 上将 zsh 用作默认 Shell,对应文件是.zprofile,而之前低版本的macOS还是对应.bash_profile,这个将是重点,语句和bash大部分兼容,更新:source ~/.zprofile
。
上一篇: lucene全文检索
下一篇: 16bit 串口发送程序设计