使用node程序的时候出现如下错误:

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'

本来用xcode-select --install可以解决,但是显示xcode-select: error: command line tools are already installed, use "Software Update" to install updates

此时直接删除xcode-select指定的目录,如: sudo rm -rf /Library/Developer/CommandLineTools, 然后运行xcode-select --install