报错:
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
解决方法
sudo xcode-select --install
如果执行完上述操作之后不再报错那皆大欢喜
但是我仍然在报错,报错内容为:
xcode-select: error: command line tools are already installed, use "Software Update" to install
各种搜索都是在命令行里输入以下内容(但是这个对于我的电脑来说并没有任何作用
)
$ rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
最终解决方法
去苹果官网重新下载最新版Command Line Tools。链接为:https://developer.apple.com/download/more/
下载完成之后点击安装即可。