For English version,scroll down.
在安装Hexo插件时,macOS版本高的用户可能碰到如下报错:
gyp: No Xcode or CLT version detected!
原因很简单,缺了Xcode的cli插件,我们把它装上就好了。
sudo xcode-select --install
执行完了好像还是不行?遇到如下报错:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
这还不简单,卸了重装就好了。
rm -rf /Library/Developer/CommandLineTools
xcode-select --install
执行提示权限不够就加上sudo就好了!
English Version:
When installing hexo tweaks,some of you might meet:
gyp: No Xcode or CLT version detected!
It’s easy to solve the problem.
In most cases, we can solve it by doing this:
sudo xcode-select --install
OK, solved.
but some of you might meet this:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
OK, Let’s delete them by doing this.
rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Then you solve the problem.