安裝 Hexo

1.安裝Homebrew

ARM版Homebrew需要安裝在/opt/homebrew路徑下噪服,早期的時(shí)候需要手動(dòng)創(chuàng)建目錄執(zhí)行命令江兢,目前使用最新腳本不需要手動(dòng)操作氓轰。

直接執(zhí)行:

官網(wǎng)命令不好用:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

執(zhí)行以下命令:

/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/

安裝遇到問(wèn)題累澡,可以通過(guò)討論群尋求幫助鳍贾。
也歡迎加群討論鞍匾,掃碼關(guān)注公眾號(hào)(湖中劍),回復(fù)'brew'加入討論群骑科。

█████████████████████████████████████
█████████████████████████████████████
████ ▄▄▄▄▄ █?█ █▄?▄ ▄ ▄▄██ ▄▄▄▄▄ ████
████ █   █ █???█ ?█????▄?█ █   █ ████
████ █▄▄▄█ █? █??█▄? █?▄ █ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄? ?▄█▄? █▄? █▄▄▄▄▄▄▄████
████     ?▄▄▄▄?▄?▄▄█??█ █ ? ?▄█▄?████
████ ?█▄??▄  █▄█?█ ▄██ █ ? ▄▄██?█████
████ █   █▄ ▄ ▄█▄ ?  ██ ? ???▄ █?████
████ ██▄██▄? █  ▄█? ▄▄?? ? █▄█▄?█████
████ ▄ ?▄▄▄?█▄ ▄?     ? ?█? ?? █?████
████ █ ???▄█▄█▄█?█?▄ █??▄▄█▄▄▄▄?█████
████▄██▄▄█▄█???█▄█▄ ?▄?█ ▄▄▄ ?   ████
████ ▄▄▄▄▄ █▄?  ▄█▄  ▄?  █▄█  ▄?█████
████ █   █ █ ?▄▄ ?▄ ?███ ▄▄▄▄ ▄? ████
████ █▄▄▄█ █ ▄▄? ██▄?▄?▄ ?▄   ▄ █████
████▄▄▄▄▄▄▄█▄▄█▄▄████▄█████▄▄█▄██████
█████████████████████████████████████
█████████████████████████████████████


請(qǐng)按回車鍵(RETURN)繼續(xù)安裝橡淑,按其他任意按鍵取消安裝
==> /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: !E厮A禾摹!6饭 7!G盒住D新Α!漾稀! 重要  DO小!U负础J邸!R笊摺J导小<鸩ァ!J詹痢V洹!H浮@崂铡!
Warning: 看到此提示宴猾,一定要執(zhí)行 Next steps 中的 環(huán)境變量設(shè)置T泊妗!仇哆!
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: B僬蕖!6锾蕖S脱丁!Q忧贰D岸摇!S缮印M米邸! 重要  D辍H沓邸!P姆尽6Э鳌!C沙搿7×汀!I拍1 !5乓簟I厦骸!
切記執(zhí)行環(huán)境變量設(shè)置著淆!劫狠,如已執(zhí)行過(guò)請(qǐng)忽略拴疤。
- 添加 Homebrew 到 /Users/jiaaf/.zprofile 文件的 PATH 中,執(zhí)行下面命令即可:
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/jiaaf/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
  如有疑問(wèn)独泞,可以訪問(wèn) https://brew.idayer.com/guide/m1/
- ?? 恭喜呐矾,安裝成功!運(yùn)行 `brew help` 開始體驗(yàn)吧
- 更多文檔: 
    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:-}";

以上注意點(diǎn):

1.安裝Xcode Command Line Tools

2.png

打開xcode選取Xcode ->Open Developer Tool ->More Developer Tools


進(jìn)入更多下載for Xcode 的tools


4.png

選擇和Xcode版本相對(duì)應(yīng)的Command Line Tools的版本

5.png

2.下載完之后提示

請(qǐng)按回車鍵(RETURN)繼續(xù)安裝懦砂,按其他任意按鍵取消安裝

3. 安裝完成homebrew,一定要執(zhí)行 Next steps 中的 環(huán)境變量設(shè)置蜒犯,如已執(zhí)行過(guò)請(qǐng)忽略

切記執(zhí)行環(huán)境變量設(shè)置: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, openssl@1.1 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: openssl@1.1
==> Pouring openssl@1.1--1.1.1k.arm64_big_sur.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
??  /opt/homebrew/Cellar/openssl@1.1/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

所有必備的應(yīng)用程序安裝完成后,即可使用 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 npm@7.18.1 to update!

安裝以后罚随,可以使用以下兩種方式執(zhí)行 Hexo:

  1. npx hexo <command>

2.將 Hexo 所在的目錄下的 node_modules 添加到環(huán)境變量之中即可直接使用 hexo <command>:

echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市羽资,隨后出現(xiàn)的幾起案子淘菩,更是在濱河造成了極大的恐慌,老刑警劉巖屠升,帶你破解...
    沈念sama閱讀 216,591評(píng)論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件潮改,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡弥激,警方通過(guò)查閱死者的電腦和手機(jī)进陡,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,448評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)微服,“玉大人,你說(shuō)我怎么就攤上這事缨历∫栽蹋” “怎么了?”我有些...
    開封第一講書人閱讀 162,823評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵辛孵,是天一觀的道長(zhǎng)丛肮。 經(jīng)常有香客問(wèn)我,道長(zhǎng)魄缚,這世上最難降的妖魔是什么宝与? 我笑而不...
    開封第一講書人閱讀 58,204評(píng)論 1 292
  • 正文 為了忘掉前任,我火速辦了婚禮冶匹,結(jié)果婚禮上习劫,老公的妹妹穿的比我還像新娘。我一直安慰自己嚼隘,他們只是感情好诽里,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,228評(píng)論 6 388
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著飞蛹,像睡著了一般谤狡。 火紅的嫁衣襯著肌膚如雪灸眼。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,190評(píng)論 1 299
  • 那天墓懂,我揣著相機(jī)與錄音焰宣,去河邊找鬼。 笑死捕仔,一個(gè)胖子當(dāng)著我的面吹牛宛徊,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播逻澳,決...
    沈念sama閱讀 40,078評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼闸天,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了斜做?” 一聲冷哼從身側(cè)響起苞氮,我...
    開封第一講書人閱讀 38,923評(píng)論 0 274
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎瓤逼,沒想到半個(gè)月后笼吟,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,334評(píng)論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡霸旗,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,550評(píng)論 2 333
  • 正文 我和宋清朗相戀三年贷帮,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片诱告。...
    茶點(diǎn)故事閱讀 39,727評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡撵枢,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出精居,到底是詐尸還是另有隱情锄禽,我是刑警寧澤,帶...
    沈念sama閱讀 35,428評(píng)論 5 343
  • 正文 年R本政府宣布靴姿,位于F島的核電站沃但,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏佛吓。R本人自食惡果不足惜宵晚,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,022評(píng)論 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望维雇。 院中可真熱鬧淤刃,春花似錦、人聲如沸谆沃。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,672評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至耕陷,卻和暖如春掂名,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背哟沫。 一陣腳步聲響...
    開封第一講書人閱讀 32,826評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工饺蔑, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人嗜诀。 一個(gè)月前我還...
    沈念sama閱讀 47,734評(píng)論 2 368
  • 正文 我出身青樓猾警,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親隆敢。 傳聞我的和親對(duì)象是個(gè)殘疾皇子发皿,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,619評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容