(1)安装
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
我的电脑在安装时出现报错:
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
解决方法:
- 找到 xcode-select的有效路径
- 使用有效路径替换https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh文件中的 /Library/Developer/CommandLineTools
1.查找 xcode-select的有效路径。
xcode-select -p
/Applications/Xcode.app/Contents/Developer
2.使用有效路径:/Applications/Xcode.app/Contents/Developer替换https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh 文件中的 /Library/Developer/CommandLineTools。
将