安装brew
安装老版node
安装brew
安装
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
看上去中科大速度比较快.
安装最后或者执行brew update时若出现以下情况
Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask, skipping update and reset! Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core, skipping update and reset! Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services, skipping update and reset!
执行以下命令即可
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services
安装老版node
#如果安装高版本不可用 卸载过,使用以下命令解除 brew unlink node #如果出现错误不用管 #搜索可用的node版本 brew search node #使用以下命令安装指定版本-本文以node 12为例 brew install node@12 #安装完成后试试 node -v #如果不行再执行 brew link --overwrite --force node@12 #再试试 node -v
1