1.安装Homebrew
ARM版Homebrew需要安装在/opt/homebrew路径下,早期的时候需要手动创建目录执行命令,目前使用最新脚本不需要手动操作。
直接执行:
官网命令不好用:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
执行以下命令:
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"
jiaaf@jiaafdeMacBook-Pro ~ % /bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
==> The following new directories will be created:
/opt/homebrew/bin
/opt/homebrew/etc
/opt/homebrew/include
/opt/homebrew/lib
/opt/homebrew/sbin
/opt/homebrew/share
/opt/homebrew/var
/opt/homebrew/opt
/opt/homebrew/share/zsh
/opt/homebrew/share/zsh/site-functions
/opt/homebrew/var/homebrew
/opt/homebrew/var/homebrew/linked
/opt/homebrew/Cellar
/opt/homebrew/Caskroom
/opt/homebrew/Frameworks
==> The Xcode Command Line Tools will be installed.
==> 安装提示
中文安装教程(建议收藏):https://brew.idayer.com/
如果你想换源,可以使用镜像助手:https://brew.idayer.com/guide/change-source/
安装遇到问题,可以通过讨论群寻求帮助。
也欢迎加群讨论,扫码关注公众号(湖中剑),回复'brew'加入讨论群。
█████████████████████████████████████
█████████████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄▀▄ ▄ ▄▄██ ▄▄▄▄▄ ████
████ █ █ █▀▀▀█ ▀█▀▀▀▀▄▀█ █ █ ████
████ █▄▄▄█ █▀ █▀▀█▄▀ █▀▄ █ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█▄▀ █▄▀ █▄▄▄▄▄▄▄████
████ ▀▄▄▄▄▀▄▀▄▄█▀▀█ █ ▀ ▀▄█▄▀████
████ ▀█▄▀▀▄ █▄█▀█ ▄██ █ ▀ ▄▄██▀█████
████ █ █▄ ▄ ▄█▄ ▀ ██ ▀ ▀▀▀▄ █▀████
████ ██▄██▄▀ █ ▄█▀ ▄▄▀▀ ▀ █▄█▄▀█████
████ ▄ ▀▄▄▄▀█▄ ▄▀ ▀ ▀█▀ ▀▀ █▀████
████ █ ▀▀▀▄█▄█▄█▀█▀▄ █▀▀▄▄█▄▄▄▄▀█████
████▄██▄▄█▄█▀▀▀█▄█▄ ▀▄▀█ ▄▄▄ ▀ ████
████ ▄▄▄▄▄ █▄▀ ▄█▄ ▄▀ █▄█ ▄▀█████
████ █ █ █ ▀▄▄ ▀▄ ▀███ ▄▄▄▄ ▄▀ ████
████ █▄▄▄█ █ ▄▄▀ ██▄▀▄▀▄ ▀▄ ▄ █████
████▄▄▄▄▄▄▄█▄▄█▄▄████▄█████▄▄█▄██████
█████████████████████████████████████
█████████████████████████████████████
请按回车键(RETURN)继续安装,按其他任意按键取消安装
==> /usr/bin/sudo /bin/mkdir -p /opt/homebrew
==> /usr/bin/sudo /usr/sbin/chown root:wheel /opt/homebrew
==> /usr/bin/sudo /bin/mkdir -p /opt/homebrew/bin /opt/homebrew/etc /opt/homebrew/include /opt/homebrew/lib /opt/homebrew/sbin /opt/homebrew/share /opt/homebrew/var /opt/homebrew/opt /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/var/homebrew /opt/homebrew/var/homebrew/linked /opt/homebrew/Cellar /opt/homebrew/Caskroom /opt/homebrew/Frameworks
==> /usr/bin/sudo /bin/chmod g+rwx /opt/homebrew/bin /opt/homebrew/etc /opt/homebrew/include /opt/homebrew/lib /opt/homebrew/sbin /opt/homebrew/share /opt/homebrew/var /opt/homebrew/opt /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/var/homebrew /opt/homebrew/var/homebrew/linked /opt/homebrew/Cellar /opt/homebrew/Caskroom /opt/homebrew/Frameworks
==> /usr/bin/sudo /usr/sbin/chown jiaaf /opt/homebrew/bin /opt/homebrew/etc /opt/homebrew/include /opt/homebrew/lib /opt/homebrew/sbin /opt/homebrew/share /opt/homebrew/var /opt/homebrew/opt /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/var/homebrew /opt/homebrew/var/homebrew/linked /opt/homebrew/Cellar /opt/homebrew/Caskroom /opt/homebrew/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /opt/homebrew/bin /opt/homebrew/etc /opt/homebrew/include /opt/homebrew/lib /opt/homebrew/sbin /opt/homebrew/share /opt/homebrew/var /opt/homebrew/opt /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/var/homebrew /opt/homebrew/var/homebrew/linked /opt/homebrew/Cellar /opt/homebrew/Caskroom /opt/homebrew/Frameworks
==> /usr/bin/sudo /usr/sbin/chown -R jiaaf:admin /opt/homebrew
==> /usr/bin/sudo /bin/mkdir -p /Users/jiaaf/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/jiaaf/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R jiaaf /Users/jiaaf/Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools for Xcode-12.5
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-12.5
Software Update Tool
Finding available software
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
Password:
Sorry, try again.
Password:
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
remote: Enumerating objects: 185687, done.
remote: Counting objects: 100% (185687/185687), done.
remote: Compressing objects: 100% (43030/43030), done.
remote: Total 185687 (delta 138343), reused 185566 (delta 138297)
Receiving objects: 100% (185687/185687), 47.92 MiB | 6.95 MiB/s, done.
Resolving deltas: 100% (138343/138343), done.
From https://mirrors.ustc.edu.cn/brew
* [new branch] master -> origin/master
* [new tag] 0.1 -> 0.1
* [new tag] 0.2 -> 0.2
* [new tag] 0.3 -> 0.3
* [new tag] 0.4 -> 0.4
* [new tag] 0.5 -> 0.5
* [new tag] 0.6 -> 0.6
* [new tag] 0.7 -> 0.7
* [new tag] 0.7.1 -> 0.7.1
* [new tag] 0.8 -> 0.8
* [new tag] 0.8.1 -> 0.8.1
* [new tag] 0.9 -> 0.9
* [new tag] 0.9.1 -> 0.9.1
* [new tag] 0.9.2 -> 0.9.2
* [new tag] 0.9.3 -> 0.9.3
* [new tag] 0.9.4 -> 0.9.4
* [new tag] 0.9.5 -> 0.9.5
* [new tag] 0.9.8 -> 0.9.8
* [new tag] 0.9.9 -> 0.9.9
* [new tag] 1.0.0 -> 1.0.0
* [new tag] 1.0.1 -> 1.0.1
* [new tag] 1.0.2 -> 1.0.2
* [new tag] 1.0.3 -> 1.0.3
* [new tag] 1.0.4 -> 1.0.4
* [new tag] 1.0.5 -> 1.0.5
* [new tag] 1.0.6 -> 1.0.6
* [new tag] 1.0.7 -> 1.0.7
* [new tag] 1.0.8 -> 1.0.8
* [new tag] 1.0.9 -> 1.0.9
* [new tag] 1.1.0 -> 1.1.0
* [new tag] 1.1.1 -> 1.1.1
* [new tag] 1.1.10 -> 1.1.10
* [new tag] 1.1.11 -> 1.1.11
* [new tag] 1.1.12 -> 1.1.12
* [new tag] 1.1.13 -> 1.1.13
* [new tag] 1.1.2 -> 1.1.2
* [new tag] 1.1.3 -> 1.1.3
* [new tag] 1.1.4 -> 1.1.4
* [new tag] 1.1.5 -> 1.1.5
* [new tag] 1.1.6 -> 1.1.6
* [new tag] 1.1.7 -> 1.1.7
* [new tag] 1.1.8 -> 1.1.8
* [new tag] 1.1.9 -> 1.1.9
* [new tag] 1.2.0 -> 1.2.0
* [new tag] 1.2.1 -> 1.2.1
* [new tag] 1.2.2 -> 1.2.2
* [new tag] 1.2.3 -> 1.2.3
* [new tag] 1.2.4 -> 1.2.4
* [new tag] 1.2.5 -> 1.2.5
* [new tag] 1.2.6 -> 1.2.6
* [new tag] 1.3.0 -> 1.3.0
* [new tag] 1.3.1 -> 1.3.1
* [new tag] 1.3.2 -> 1.3.2
* [new tag] 1.3.3 -> 1.3.3
* [new tag] 1.3.4 -> 1.3.4
* [new tag] 1.3.5 -> 1.3.5
* [new tag] 1.3.6 -> 1.3.6
* [new tag] 1.3.7 -> 1.3.7
* [new tag] 1.3.8 -> 1.3.8
* [new tag] 1.3.9 -> 1.3.9
* [new tag] 1.4.0 -> 1.4.0
* [new tag] 1.4.1 -> 1.4.1
* [new tag] 1.4.2 -> 1.4.2
* [new tag] 1.4.3 -> 1.4.3
* [new tag] 1.5.0 -> 1.5.0
* [new tag] 1.5.1 -> 1.5.1
* [new tag] 1.5.10 -> 1.5.10
* [new tag] 1.5.11 -> 1.5.11
* [new tag] 1.5.12 -> 1.5.12
* [new tag] 1.5.13 -> 1.5.13
* [new tag] 1.5.14 -> 1.5.14
* [new tag] 1.5.2 -> 1.5.2
* [new tag] 1.5.3 -> 1.5.3
* [new tag] 1.5.4 -> 1.5.4
* [new tag] 1.5.5 -> 1.5.5
* [new tag] 1.5.6 -> 1.5.6
* [new tag] 1.5.7 -> 1.5.7
* [new tag] 1.5.8 -> 1.5.8
* [new tag] 1.5.9 -> 1.5.9
* [new tag] 1.6.0 -> 1.6.0
* [new tag] 1.6.1 -> 1.6.1
* [new tag] 1.6.10 -> 1.6.10
* [new tag] 1.6.11 -> 1.6.11
* [new tag] 1.6.12 -> 1.6.12
* [new tag] 1.6.13 -> 1.6.13
* [new tag] 1.6.14 -> 1.6.14
* [new tag] 1.6.15 -> 1.6.15
* [new tag] 1.6.16 -> 1.6.16
* [new tag] 1.6.17 -> 1.6.17
* [new tag] 1.6.2 -> 1.6.2
* [new tag] 1.6.3 -> 1.6.3
* [new tag] 1.6.4 -> 1.6.4
* [new tag] 1.6.5 -> 1.6.5
* [new tag] 1.6.6 -> 1.6.6
* [new tag] 1.6.7 -> 1.6.7
* [new tag] 1.6.8 -> 1.6.8
* [new tag] 1.6.9 -> 1.6.9
* [new tag] 1.7.0 -> 1.7.0
* [new tag] 1.7.1 -> 1.7.1
* [new tag] 1.7.2 -> 1.7.2
* [new tag] 1.7.3 -> 1.7.3
* [new tag] 1.7.4 -> 1.7.4
* [new tag] 1.7.5 -> 1.7.5
* [new tag] 1.7.6 -> 1.7.6
* [new tag] 1.7.7 -> 1.7.7
* [new tag] 1.8.0 -> 1.8.0
* [new tag] 1.8.1 -> 1.8.1
* [new tag] 1.8.2 -> 1.8.2
* [new tag] 1.8.3 -> 1.8.3
* [new tag] 1.8.4 -> 1.8.4
* [new tag] 1.8.5 -> 1.8.5
* [new tag] 1.8.6 -> 1.8.6
* [new tag] 1.9.0 -> 1.9.0
* [new tag] 1.9.1 -> 1.9.1
* [new tag] 1.9.2 -> 1.9.2
* [new tag] 1.9.3 -> 1.9.3
* [new tag] 2.0.0 -> 2.0.0
* [new tag] 2.0.1 -> 2.0.1
* [new tag] 2.0.2 -> 2.0.2
* [new tag] 2.0.3 -> 2.0.3
* [new tag] 2.0.4 -> 2.0.4
* [new tag] 2.0.5 -> 2.0.5
* [new tag] 2.0.6 -> 2.0.6
* [new tag] 2.1.0 -> 2.1.0
* [new tag] 2.1.1 -> 2.1.1
* [new tag] 2.1.10 -> 2.1.10
* [new tag] 2.1.11 -> 2.1.11
* [new tag] 2.1.12 -> 2.1.12
* [new tag] 2.1.13 -> 2.1.13
* [new tag] 2.1.14 -> 2.1.14
* [new tag] 2.1.15 -> 2.1.15
* [new tag] 2.1.16 -> 2.1.16
* [new tag] 2.1.2 -> 2.1.2
* [new tag] 2.1.3 -> 2.1.3
* [new tag] 2.1.4 -> 2.1.4
* [new tag] 2.1.5 -> 2.1.5
* [new tag] 2.1.6 -> 2.1.6
* [new tag] 2.1.7 -> 2.1.7
* [new tag] 2.1.8 -> 2.1.8
* [new tag] 2.1.9 -> 2.1.9
* [new tag] 2.2.0 -> 2.2.0
* [new tag] 2.2.1 -> 2.2.1
* [new tag] 2.2.10 -> 2.2.10
* [new tag] 2.2.11 -> 2.2.11
* [new tag] 2.2.12 -> 2.2.12
* [new tag] 2.2.13 -> 2.2.13
* [new tag] 2.2.14 -> 2.2.14
* [new tag] 2.2.15 -> 2.2.15
* [new tag] 2.2.16 -> 2.2.16
* [new tag] 2.2.17 -> 2.2.17
* [new tag] 2.2.2 -> 2.2.2
* [new tag] 2.2.3 -> 2.2.3
* [new tag] 2.2.4 -> 2.2.4
* [new tag] 2.2.5 -> 2.2.5
* [new tag] 2.2.6 -> 2.2.6
* [new tag] 2.2.7 -> 2.2.7
* [new tag] 2.2.8 -> 2.2.8
* [new tag] 2.2.9 -> 2.2.9
* [new tag] 2.3.0 -> 2.3.0
* [new tag] 2.4.0 -> 2.4.0
* [new tag] 2.4.1 -> 2.4.1
* [new tag] 2.4.10 -> 2.4.10
* [new tag] 2.4.11 -> 2.4.11
* [new tag] 2.4.12 -> 2.4.12
* [new tag] 2.4.13 -> 2.4.13
* [new tag] 2.4.14 -> 2.4.14
* [new tag] 2.4.15 -> 2.4.15
* [new tag] 2.4.16 -> 2.4.16
* [new tag] 2.4.2 -> 2.4.2
* [new tag] 2.4.3 -> 2.4.3
* [new tag] 2.4.4 -> 2.4.4
* [new tag] 2.4.5 -> 2.4.5
* [new tag] 2.4.6 -> 2.4.6
* [new tag] 2.4.7 -> 2.4.7
* [new tag] 2.4.8 -> 2.4.8
* [new tag] 2.4.9 -> 2.4.9
* [new tag] 2.5.0 -> 2.5.0
* [new tag] 2.5.1 -> 2.5.1
* [new tag] 2.5.10 -> 2.5.10
* [new tag] 2.5.11 -> 2.5.11
* [new tag] 2.5.12 -> 2.5.12
* [new tag] 2.5.2 -> 2.5.2
* [new tag] 2.5.3 -> 2.5.3
* [new tag] 2.5.4 -> 2.5.4
* [new tag] 2.5.5 -> 2.5.5
* [new tag] 2.5.6 -> 2.5.6
* [new tag] 2.5.7 -> 2.5.7
* [new tag] 2.5.8 -> 2.5.8
* [new tag] 2.5.9 -> 2.5.9
* [new tag] 2.6.0 -> 2.6.0
* [new tag] 2.6.1 -> 2.6.1
* [new tag] 2.6.2 -> 2.6.2
* [new tag] 2.7.0 -> 2.7.0
* [new tag] 2.7.1 -> 2.7.1
* [new tag] 2.7.2 -> 2.7.2
* [new tag] 2.7.3 -> 2.7.3
* [new tag] 2.7.4 -> 2.7.4
* [new tag] 2.7.5 -> 2.7.5
* [new tag] 2.7.6 -> 2.7.6
* [new tag] 2.7.7 -> 2.7.7
* [new tag] 3.0.0 -> 3.0.0
* [new tag] 3.0.1 -> 3.0.1
* [new tag] 3.0.10 -> 3.0.10
* [new tag] 3.0.11 -> 3.0.11
* [new tag] 3.0.2 -> 3.0.2
* [new tag] 3.0.3 -> 3.0.3
* [new tag] 3.0.4 -> 3.0.4
* [new tag] 3.0.5 -> 3.0.5
* [new tag] 3.0.6 -> 3.0.6
* [new tag] 3.0.7 -> 3.0.7
* [new tag] 3.0.8 -> 3.0.8
* [new tag] 3.0.9 -> 3.0.9
* [new tag] 3.1.0 -> 3.1.0
* [new tag] 3.1.1 -> 3.1.1
* [new tag] 3.1.10 -> 3.1.10
* [new tag] 3.1.11 -> 3.1.11
* [new tag] 3.1.12 -> 3.1.12
* [new tag] 3.1.2 -> 3.1.2
* [new tag] 3.1.3 -> 3.1.3
* [new tag] 3.1.4 -> 3.1.4
* [new tag] 3.1.5 -> 3.1.5
* [new tag] 3.1.6 -> 3.1.6
* [new tag] 3.1.7 -> 3.1.7
* [new tag] 3.1.8 -> 3.1.8
* [new tag] 3.1.9 -> 3.1.9
remote: Enumerating objects: 7531, done.
remote: Counting objects: 100% (7531/7531), done.
remote: Compressing objects: 100% (1581/1581), done.
remote: Total 7531 (delta 5798), reused 7531 (delta 5798)
Receiving objects: 100% (7531/7531), 1.61 MiB | 3.13 MiB/s, done.
Resolving deltas: 100% (5798/5798), completed with 737 local objects.
From https://mirrors.ustc.edu.cn/brew
* [new tag] 1.1.0.1 -> 1.1.0.1
* [new tag] 1.1.2.1 -> 1.1.2.1
* [new tag] 1.2.7 -> 1.2.7
* [new tag] 1.2.8 -> 1.2.8
* [new tag] backup/activesupport-23-38-09 -> backup/activesupport-23-38-09
* [new tag] backup/brew-cask-style-14-54-55 -> backup/brew-cask-style-14-54-55
* [new tag] backup/create-cache-00-29-47 -> backup/create-cache-00-29-47
* [new tag] backup/days-03-02-52 -> backup/days-03-02-52
* [new tag] backup/days-03-02-59 -> backup/days-03-02-59
* [new tag] backup/days-19-30-23 -> backup/days-19-30-23
* [new tag] backup/gpg-verification-01-53-16 -> backup/gpg-verification-01-53-16
* [new tag] backup/remove-popen-read-19-56-50 -> backup/remove-popen-read-19-56-50
* [new tag] backup/remove-popen-read-20-00-21 -> backup/remove-popen-read-20-00-21
HEAD is now at 736278c02 Merge pull request #11562 from Homebrew/update-man-completions
==> Tapping homebrew/core
remote: Enumerating objects: 975965, done.
remote: Total 975965 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (975965/975965), 389.18 MiB | 8.08 MiB/s, done.
Resolving deltas: 100% (671995/671995), done.
From https://mirrors.ustc.edu.cn/homebrew-core
* [new branch] master -> origin/master
HEAD is now at ea8e4c8596 tectonic: update 0.6.4 bottle.
HOMEBREW_BREW_GIT_REMOTE set: using https://mirrors.ustc.edu.cn/brew.git for Homebrew/brew Git remote.
HOMEBREW_CORE_GIT_REMOTE set: using https://mirrors.ustc.edu.cn/homebrew-core.git for Homebrew/brew Git remote.
Warning: !!!!!!!!!!! 重要 !!!!!!!!!!!!!!!
Warning: 看到此提示,一定要执行 Next steps 中的 环境变量设置!!!
Warning: /opt/homebrew/bin is not in your PATH.
==> 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:
Warning: !!!!!!!!!!! 重要 !!!!!!!!!!!!!!!
切记执行环境变量设置!,如已执行过请忽略。
- 添加 Homebrew 到 /Users/jiaaf/.zprofile 文件的 PATH 中,执行下面命令即可:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/jiaaf/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
如有疑问,可以访问 https://brew.idayer.com/guide/m1/
- 恭喜,安装成功!运行 `brew help` 开始体验吧
- 更多文档:
https://docs.brew.sh
https://brew.idayer.com
jiaaf@jiaafdeMacBook-Pro ~ % /Users/jiaaf/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
zsh: no such file or directory: /Users/jiaaf/.zprofile
jiaaf@jiaafdeMacBook-Pro ~ % /opt/homebrew/bin/brew shellenv
export HOMEBREW_PREFIX="/opt/homebrew";
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
export HOMEBREW_REPOSITORY="/opt/homebrew";
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
以上注意点:
1.安装Xcode Command Line Tools
打开xcode选取Xcode ->Open Developer Tool ->More Developer Tools
进入更多下载for Xcode 的tools
选择和Xcode版本相对应的Command Line Tools的版本
2.下载完之后提示
请按回车键(RETURN)继续安装,按其他任意按键取消安装
3. 安装完成homebrew,一定要执行 Next steps 中的 环境变量设置,如已执行过请忽略
切记执行环境变量设置:echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/jiaaf/.zprofile
2.安装git
$ brew install git
jiaaf@jiaafdeMacBook-Pro ~ % brew install git
==> Downloading https://ghcr.io/v2/homebrew/core/gettext/manifests/0.21
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gettext/blobs/sha256:339b62b52ba8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pcre2/manifests/10.37
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pcre2/blobs/sha256:7bdcd1b4fa7a51
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/git/manifests/2.32.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/git/blobs/sha256:fc595cdaa2ea7e96
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Installing dependencies for git: gettext and pcre2
==> Installing git dependency: gettext
==> Pouring gettext--0.21.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/gettext/0.21: 1,953 files, 20.8MB
==> Installing git dependency: pcre2
==> Pouring pcre2--10.37.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/pcre2/10.37: 230 files, 5MB
==> Installing git
==> Pouring git--2.32.0.arm64_big_sur.bottle.tar.gz
==> Caveats
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
zsh completions and functions have been installed to:
/opt/homebrew/share/zsh/site-functions
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/git
==> Summary
/opt/homebrew/Cellar/git/2.32.0: 1,517 files, 42.6MB
==> Caveats
==> git
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
zsh completions and functions have been installed to:
/opt/homebrew/share/zsh/site-functions
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/git
3.安装Node.js
$ brew install Node.js
jiaaf@jiaafdeMacBook-Pro ~ % brew install Node.js
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/manifests/1.0.9
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/blobs/sha256:bcd00b6f423ec
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/manifests/1.17.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/blobs/sha256:63627c4d2e469
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/69.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/blobs/sha256:25a1ec460d422b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libuv/manifests/1.41.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libuv/blobs/sha256:25ba3f6a09c7fa
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/jemalloc/manifests/5.2.1_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/jemalloc/blobs/sha256:724ab5947e5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libev/manifests/4.33
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libev/blobs/sha256:8ed86bdd0ff3b4
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1k
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:0a75e0f1
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/manifests/1.43.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/blobs/sha256:e927b6ac2598
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/node/manifests/16.3.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/node/blobs/sha256:3de4ebc0c132da4
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha2
######################################################################## 100.0%
==> Installing dependencies for node: brotli, c-ares, icu4c, libuv, jemalloc, libev, [email protected] and nghttp2
==> Installing node dependency: brotli
==> Pouring brotli--1.0.9.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/brotli/1.0.9: 25 files, 2.3MB
==> Installing node dependency: c-ares
==> Pouring c-ares--1.17.1.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/c-ares/1.17.1: 85 files, 693.8KB
==> Installing node dependency: icu4c
==> Pouring icu4c--69.1.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/icu4c/69.1: 259 files, 73.3MB
==> Installing node dependency: libuv
==> Pouring libuv--1.41.0.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/libuv/1.41.0: 49 files, 3.2MB
==> Installing node dependency: jemalloc
==> Pouring jemalloc--5.2.1_1.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/jemalloc/5.2.1_1: 16 files, 2.2MB
==> Installing node dependency: libev
==> Pouring libev--4.33.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/libev/4.33: 12 files, 501.2KB
==> Installing node dependency: [email protected]
==> Pouring [email protected]_big_sur.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
/opt/homebrew/Cellar/[email protected]/1.1.1k: 8,071 files, 18MB
==> Installing node dependency: nghttp2
==> Pouring nghttp2--1.43.0.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/nghttp2/1.43.0: 24 files, 2.8MB
==> Installing node
==> Pouring node--16.3.0.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Cellar/node/16.3.0: 2,777 files, 48MB
4. 安装 Hexo
所有必备的应用程序安装完成后,即可使用 npm 安装 Hexo。
$ npm install -g hexo-cli
jiaaf@jiaafdeMacBook-Pro ~ % npm install -g hexo-cli
added 63 packages, and audited 64 packages in 59s
11 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 7.15.1 -> 7.18.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.18.1
npm notice Run npm install -g [email protected] to update!
安装以后,可以使用以下两种方式执行 Hexo:
- npx hexo
2.将 Hexo 所在的目录下的 node_modules 添加到环境变量之中即可直接使用 hexo
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile