























1. 为macOS终端设置代理

2. 检查代理是否设置成功

3. 如果无法ping通www.google.com,则修改hosts文件
Shift + Command + G/etc/hosts# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
185.199.108.133 raw.githubusercontent.com4. 网络环境解决后,开始安装Homebrew
Enter开始运行:/bin/bash -c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Enter继续安装
/opt/homebrew/bin 不在路径中
Next steps:(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/longhui/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"5. 学习homebrew管理和安装软件相关命令
brew help



brew update——更新homebrew本体brew outdated——列出过时的软件brew upgrade——更新homebrew管理的所有过时软件brew search + software——查找软件brew info + software——显示软件简介brew home + software——打开软件官网brew install+ software——安装软件brew uninstall+ software——卸载软件brew install --adopt——接管非homebrew渠道安装的软件
现在新增了一个非常实用的选项--adopt。这很好地解决了用 Homebrew 管理图形界面软件时,与用户手动安装版本以及软件的自动更新功能「打架」的问题。例如在以前,如果你从官网下载安装过 Notion,然后忘记了这回事,试图用 Homebrew 安装或更新,就会看到「软件已存在」的报错信息。这显然非常不智能:用户没有义务记住每个软件最初的安装渠道;既然已经装过了,那就没必要再装一遍,直接「接管」这个版本,以后一并纳入 Homebrew 的管理范围。(这段来源少数派作者)
platyhsu@forsa ~ % brew install notion
--adopt
==
> Downloading https://desktop-release.notion-static.com/Notion-2.1.12-arm64.dmg
######################################################################## 100.0%
==
> Installing Cask notion
==
> Purging files
for
version
2
.1.12 of Cask notion
==
> Installing Cask notion
==
> Adopting existing App at
'/Applications/Notion.app'
🍺 notion was successfully installed!此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。